Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created February 27, 2014 19:33
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 billerickson/9257470 to your computer and use it in GitHub Desktop.
Save billerickson/9257470 to your computer and use it in GitHub Desktop.
<?php
/**
* Blog Sidebar
*
*/
function be_blog_sidebar() {
if( is_home() || is_archive() || is_singular( 'post' ) ) {
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
if( function_exists( 'ss_do_sidebar' ) )
remove_action( 'genesis_sidebar', 'ss_do_sidebar' );
dynamic_sidebar( 'blog-sidebar' );
}
}
add_action( 'genesis_sidebar', 'be_blog_sidebar', 5 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment