Skip to content

Commit

Permalink
The Events Calendar ld+json block removed via functions.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Bulatov committed Feb 16, 2016
1 parent 7a9a349 commit c75745b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions wp-content/themes/mag-wp/functions.php
Expand Up @@ -479,3 +479,24 @@ function myfeed_request($qv) {
}
add_filter('request', 'myfeed_request');

// ----------------------------------------------------------------------------------------------------
// Remove unnecessary JSON+LD schema block being added by The Events Calendar to Events pages - Andre
// ----------------------------------------------------------------------------------------------------
/*
global $Tribe__Events__Template__Single_Event;
remove_action( 'wp_head', array( $Tribe__Events__Template__Single_Event, 'google_data_markup' ) );
remove_action( 'wp_head', array( &$Tribe__Events__Template__Single_Event, 'google_data_markup' ) );
global $Tribe__Events__Template_Factory;
remove_action( 'wp_head', array( $Tribe__Events__Template_Factory, 'google_data_markup' ) );
remove_action( 'wp_head', array( &$Tribe__Events__Template_Factory, 'google_data_markup' ) );
*/
//remove_action( 'Tribe__Events__Template__Single_Event', array( 'Tribe__Events__Template__Single_Event', 'google_data_markup' ) );

/*
function remove_the_events_calendar_jsonld() {
remove_action( 'wp_head', array( $Tribe__Events__Template__Single_Event, 'google_data_markup' ) );
}
add_action( 'plugins_loaded', 'remove_the_events_calendar_jsonld', 1 );
*/
//global $wp_filter; print_r($wp_filter);
add_filter( 'tribe_google_data_markup_json', '__return_empty_string', 20 );

0 comments on commit c75745b

Please sign in to comment.