Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active December 19, 2015 03:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braddalton/5894024 to your computer and use it in GitHub Desktop.
Save braddalton/5894024 to your computer and use it in GitHub Desktop.
genesis_register_sidebar( array(
'id' => 'custom-widget',
'name' => __( 'Custom Widget', 'wpsites' ),
'description' => __( 'Display Content Before Blog Page Loop', 'wpsites' ),
) );
/**
* @author Brad Dalton - WP Sites
* @example http://wp.me/p1lTu0-9NG
*/
add_action( 'genesis_before_content', 'wpsites_custom_widget', 5 );
function wpsites_custom_widget() {
if ( is_page_template( 'page_blog.php' ) && is_active_sidebar( 'custom-widget' ) )
genesis_widget_area( 'custom-widget', array(
'before' => '<aside class="custom-widget">',
'after' => '</aside>',
) );
}
@cdeneve
Copy link

cdeneve commented Sep 6, 2015

I'm trying to add the Genesis Responsive Slider widget to my blog page with no luck using all the plugins available... works on new pages, but not the blog page. Is this the code I need to make that work? Where do I add it? Appreciate any help.

No laughing at a non-techie... :)

@cdeneve
Copy link

cdeneve commented Sep 6, 2015

Updating to say I found a way to do this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment