Last active
August 29, 2015 14:02
-
-
Save BrianBourn/fdafe388e59c6f9470ba to your computer and use it in GitHub Desktop.
Dealing with Genesis Simple Sidebars
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 | |
//***Add Simple Sidebar Functionality To Author Archives**/ | |
add_action( 'get_header', 'bourncreative_simplesidebars_check' ); | |
function bourncreative_simplesidebars_check() { | |
if ( function_exists( 'ss_sidebars_init' ) && is_active_sidebar( 'caterina-rando-sidebar' ) ) { | |
remove_action( 'genesis_sidebar_alt', 'ss_do_sidebar_alt' ); // Unhook Genesis Simple Sidebars | |
add_action( 'genesis_sidebar_alt', 'bourncreative_author_sidebar_alt' ); // Add Back Custom Sidebar Created With Simple Sidebars | |
function bourncreative_author_sidebar_alt() { | |
dynamic_sidebar( 'caterina-rando-sidebar' ); | |
} | |
} | |
} |
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 | |
remove_action( 'get_header', 'ss_sidebars_init' ); // Override Genesis Simple Sidebars | |
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); | |
add_action( 'genesis_sidebar', 'jesse_sidebar_function' ); | |
function jesse_sidebar_function() { | |
if ( is_active_sidebar( 'your-sidebar' ) ) { | |
dynamic_sidebar( 'your-sidebar' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment