Skip to content

Instantly share code, notes, and snippets.

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/6547386 to your computer and use it in GitHub Desktop.
Save braddalton/6547386 to your computer and use it in GitHub Desktop.
genesis_register_sidebar( array(
'id' => 'banner-add',
'name' => __( 'Banner Advert', 'wpsites.net' ),
'description' => __( 'This is the banner advert widget.', 'wpsites.net' ),
) );
function before_loop_banner() {
if(is_single() && !is_page('672') && is_active_sidebar( 'banner-add' ) ) {
echo '<div class="banner-add">';
dynamic_sidebar( 'banner-add' );
echo '</div><!-- end #banner-add -->';
}
}
add_action('genesis_before_loop', 'before_loop_banner');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment