This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>', | |
) ); | |
} | |
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
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... :)