Skip to content

Instantly share code, notes, and snippets.

@swinggraphics
Created October 15, 2022 14:28
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 swinggraphics/9e614f0a1105321b6d14b4ba96c2ac04 to your computer and use it in GitHub Desktop.
Save swinggraphics/9e614f0a1105321b6d14b4ba96c2ac04 to your computer and use it in GitHub Desktop.
Prevent The Events Calendar from hijacking the single post template
// Let page builders like Elementor control the display of single events
function dont_let_tec_hijack( $should_hijack, $query ) {
if ( $query->is_single() ) $should_hijack = false;
return $should_hijack;
}
add_filter( 'tribe_events_views_v2_should_hijack_page_template', 'dont_let_tec_hijack', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment