Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active December 22, 2015 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braddalton/6473041 to your computer and use it in GitHub Desktop.
Save braddalton/6473041 to your computer and use it in GitHub Desktop.
genesis_register_sidebar( array(
'id' => 'home-featured',
'name' => __( 'Home Featured', 'eleven40' ),
'description' => __( 'This is the home featured section.', 'eleven40' ),
) );
/** Add the home featured section */
add_action( 'genesis_before_content_sidebar_wrao', 'eleven40_home_featured' );
function eleven40_home_featured() {
if (is_page(array(007,008,009) && is_home())) {
/** Do nothing on page 2 or greater */
if ( get_query_var( 'paged' ) >= 2 )
return;
genesis_widget_area( 'home-featured', array(
'before' => '<div class="home-featured widget-area">',
) );
}}
// Source http://www.briangardner.com/home-widget-area-eleven40/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment