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