Skip to content

Instantly share code, notes, and snippets.

@jonschr
Last active August 29, 2015 14:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonschr/d2665bc726e16cdd84c7 to your computer and use it in GitHub Desktop.
Save jonschr/d2665bc726e16cdd84c7 to your computer and use it in GitHub Desktop.
add_action('genesis_before_sidebar_widget_area','rb_change_genesis_sidebar');
function rb_change_genesis_sidebar() {
if ( 'tribe_events' == get_post_type() ) {
remove_action( 'genesis_sidebar', 'ss_do_sidebar' ); // remove the Genesis simple sidebars sidebar (this is the one being used now, but if this plugin were deactivated...)
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); //remove the default genesis sidebar
add_action( 'genesis_sidebar', 'rb_do_sidebar' ); //add an action hook to call the function for my custom sidebar
}
}
//Function to output my custom sidebar
function rb_do_sidebar() {
dynamic_sidebar( 'events-widget-area' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment