Created
May 10, 2013 18:12
-
-
Save billerickson/5556274 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
/** | |
* Set Up Child Theme | |
* | |
*/ | |
function child_theme_setup() { | |
// Set up Blog Sidebar | |
genesis_register_sidebar( array( 'name' => 'Blog Sidebar', 'id' => 'blog-sidebar' ) ); | |
add_action( 'genesis_sidebar', 'be_blog_sidebar', 5 ); | |
} | |
add_action('genesis_setup','child_theme_setup', 15); | |
/** | |
* Blog Sidebar | |
* | |
*/ | |
function be_blog_sidebar() { | |
if( is_single() || is_home() || is_archive() ) { | |
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); | |
remove_action( 'genesis_sidebar', 'ss_do_sidebar' ); | |
dynamic_sidebar( 'blog-sidebar' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment