Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

@cdeneve 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

This comment has been minimized.

Copy link

@cdeneve 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