Skip to content

Instantly share code, notes, and snippets.

@jonwatson87
Created June 20, 2016 23:27
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 jonwatson87/aa152ea6ccdcf40df25f88fd26abe941 to your computer and use it in GitHub Desktop.
Save jonwatson87/aa152ea6ccdcf40df25f88fd26abe941 to your computer and use it in GitHub Desktop.
Replace genesis default sidebar with custom sidebar on a specific template
// 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