Skip to content

Instantly share code, notes, and snippets.

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 barryhughes/be4b056257ceb214d169 to your computer and use it in GitHub Desktop.
Save barryhughes/be4b056257ceb214d169 to your computer and use it in GitHub Desktop.
Prevent the before-event-html field from operating on specific pages (in this example, the Community Events editor)
function conditionally_remove_tribe_before_html( $html ) {
if ( ! function_exists( 'tribe_is_community_edit_event_page' ) ) return $html;
if ( ! tribe_is_community_edit_event_page() ) return $html;
return '';
}
add_filter( 'tribe_events_before_html', 'conditionally_remove_tribe_before_html' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment