In Genesis Slack chat a user asked: Has anyone here created a full-width `after-entry` widget area? In other words: |content |sidebar | | after-entry | | comments | We can reposition author box, after entry widget area, adjacent entry navigation and comments from after entry to after content on single posts by removing the actions […]
Quick Tips
How to add link to comments when commenting is disabled for posts in Genesis
By default bylines or post info in Genesis shows the published date, author link, link to comments and edit links. Posts for which comments have been turned off by unchecking “Allow comments.” in the Discussion meta box in post editor will not show the link to comments. It is possible to show comments link by […]
Simplifying the code for registering multiple widget areas in Genesis
In the vein of my earlier post on simplifying the code for displaying multiple widget areas in Genesis, I share the condensed code for registering 4 widget areas here. // Register front-page widget areas for ( $i = 1; $i <= 4; $i++ ) { genesis_register_widget_area( array( ‘id’ => "front-page-{$i}", ‘name’ => __( "Front Page […]
How to apply Full Content layout to archives in Genesis
Looking to remove sidebar(s) on all archive pages in your Genesis site? Just add the following in child theme’s functions.php. // Force full content layout on archives add_action( ‘get_header’, function () { if ( !is_archive() ) { return; } add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ ); } );
Changing footer text in Genesis using genesis_footer_creds_text filter
One of the several ways in which footer content can be changed in Genesis is using the genesis_footer_creds_text filter. Ex.: // Change the footer text add_filter( ‘genesis_footer_creds_text’, ‘sp_footer_creds_filter’ ); function sp_footer_creds_filter( $creds ) { $creds = ‘Copyright © 2024 <a href="’.get_bloginfo( ‘url’ ).’">’.get_bloginfo( ‘name’ ).'</a>’; return $creds; } to get If you want to display a […]
Thin Font Awesome Close Icon
As of v4.7.0, FontAwesome does not have a thin close (x) icon. <i class="fa fa-times fa-2x" aria-hidden="true"></i> results in, for example, To display a thin icon instead, add this CSS: .fa-times-thin:before { content: ‘\00d7’; } and this sample HTML: <i class="fa fa-times-thin fa-2x" aria-hidden="true"></i> The result: Much better! Source: https://github.com/FortAwesome/Font-Awesome/issues/1540#issuecomment-68689950
Simplifying the code for displaying multiple widget areas in Genesis
Updated on April 26, 2017 Let’s say you want to display 5 widget areas for the front page. The code for this is something like genesis_widget_area( ‘front-page-1’, array( ‘before’ => ‘<div class=”front-page-1 widget-area”><div class=”wrap”>’, ‘after’ => ‘</div></div>’, ) ); genesis_widget_area( ‘front-page-2’, array( ‘before’ => ‘<div class=”front-page-2 widget-area”><div class=”wrap”>’, ‘after’ => ‘</div></div>’, ) ); genesis_widget_area( ‘front-page-3’, […]
How to apply full content layout to WooCommerce pages in Genesis
Looking to force full content layout to all WooCommerce product category archives, WooCommerce product tag archives and single product pages in your Genesis site? Just add the following code in your child theme’s functions.php: // Force full content layout on product category, product tag archives and all single products add_action( ‘get_header’, ‘sk_force_layout’ ); function sk_force_layout() […]
How to set up different sidebars for archives and Pages in Genesis
Looking to display a specific custom sidebar (widget area container) for archives (Posts page, category/tag/author/search results etc. archives) and single blog post pages widgets of custom another sidebar on static Pages in the Primary Sidebar location of your Genesis site? Just add the following in your child theme’s functions.php // Register Blog Sidebar widget area […]
How to add menu-slug-container class when setting a custom one in wp_nav_menu’s container_class
In my last tutorial I wanted to output a nav menu assigned to a particular theme location with the nav element having the standard auto generated class as well as a custom one. wp_nav_menu( array( ‘theme_location’ => ‘header’, ‘divider_html’ => $divider_html, ‘container’ => ‘nav’, ‘menu_class’ => ‘menu genesis-nav-menu menu-header js-superfish’ ) ); outputs for example, […]
Recent Comments