Support » Plugin: The Events Calendar » Remove Tribe references

  • Hi,

    We are only using The Events Calendar for logged in users and all events are published “private”. We would like to remove all The Events Calendar -references in the code when browsing public pages. So far I have been able to dequeue all tribe styles for non -logged in users. Could you please help me remove the following tag/links also:

    rel=”alternate” type=”text/calendar” “iCal stream”
    rel=”” “wp-json/tribe/events/v1/”
    meta name=”tec-api-origin”


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Andras Guseo


    Hi @aggk,

    Thanks for reaching out.

    The second and third is a REST API thing, so disabling the REST API should remove that. This snippet should do that:

    Or you can check this plugin.

    As for the first one, try copying this line into your functions.php file and see if it does the trick:

    remove_action( 'wp_head', 'feed_links_extra', 3 );


    Thank you András, I really appreciate it!

    But I actually found another solution where I simply remove The Events Calendar -plugin from pages that don´t use it, at the “muplugins” -folder. Do you see any problems with using this approach instead?

    add_filter( 'option_active_plugins', function( $plugins ) {
    $request_uri = parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH );
    $is_events = strpos( $request_uri, '/events/' );
    $is_intranetstart = strpos( $request_uri, '/intranetstart/' );
    	if ($is_ events === false AND $is_intranetstart === false AND is_admin() === false){ 
            	$key = array_search( 'the-events-calendar/the-events-calendar.php' , $plugins );
    		if ( false !== $key ) {
                    	unset( $plugins[ $key ] );
                    return $plugins;
            else {
            	return $plugins;
    }, 99 );

    From what I can tell it´s working.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove Tribe references’ is closed to new replies.