Skip to content

Instantly share code, notes, and snippets.

@bodiequirk
Last active August 29, 2015 14:25
Show Gist options
  • Save bodiequirk/e39ba057e796a5b086c4 to your computer and use it in GitHub Desktop.
Save bodiequirk/e39ba057e796a5b086c4 to your computer and use it in GitHub Desktop.
Load Sermons Sidebar for Sermon Manager in Genesis
function be_blog_sidebar() {
if( 'wpfc_sermon' !== get_post_type() ) {
// not wpfc_sermon post type? bail.
return;
}
//remove the default sidebar
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
// using simple sidebars?
if( function_exists( 'ss_do_sidebar' ) ) {
//remove the simple sidebar
remove_action( 'genesis_sidebar', 'ss_do_sidebar' );
}
// output the sermon menu
dynamic_sidebar( 'sermons-menu' );
}
add_action( 'genesis_sidebar', 'be_blog_sidebar', 5 );
@bodiequirk
Copy link
Author

For loading a custom sidebar for sermon archives using Sermon Manager in Genesis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment