Created
June 20, 2016 23:27
-
-
Save jonwatson87/aa152ea6ccdcf40df25f88fd26abe941 to your computer and use it in GitHub Desktop.
Replace genesis default sidebar with custom sidebar on a specific template
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
// Replace standard sidebar with custom sidebar | |
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); | |
remove_action( 'genesis_sidebar_alt', 'genesis_do_sidebar_alt' ); | |
add_action( 'genesis_sidebar', 'your_custom_sidebar' ); | |
function your_custom_sidebar() { | |
echo '<div class="custom-sidebar">'; | |
dynamic_sidebar( 'custom-sidebar' ); | |
echo '</div><!---custom-sidebar--->'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment