• Resolved jcaiaffa

    (@jcaiaffa)


    Hi, Thanks for this wonderful plugin!!! I have been having issues exluding The events calendar events from sitemap.xml, I have added noindex to the post_type, to the event itself, event used this filter:

    add_filter('the_seo_framework_sitemap_supported_post_types', function ($post_types) {
    	return array_diff(
    		$post_types,
    		[
    			'tribe_events'
    		]
    	);
    });

    but nothing seems to work, the events keep appearing on the sitemap.xml even when they are in the trash can, do you know what could be happening?

    • This topic was modified 1 year, 10 months ago by jcaiaffa.
    • This topic was modified 1 year, 10 months ago by jcaiaffa.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jcaiaffa

    (@jcaiaffa)

    Hey there! I would appreciate any help!

    Plugin Author Sybre Waaijer

    (@cybr)

    Howdy! I hope you had a great weekend 🙂

    That filter works only for The SEO Framework’s “Optimized” sitemap.

    If you already use that sitemap, please make sure the sitemap’s cache is refreshed to reflect your changes. You can do this by resaving the SEO Settings. If you want to debug that sitemap actively, I recommend disabling the sitemap’s cache at “SEO Settings > General > Performance.” The cache flushes automatically after seven days of caching.

    Thread Starter jcaiaffa

    (@jcaiaffa)

    hey Sybre! thanks so much for the answer, nothing works for me, I’m using the “Optimized” sitemap and changing all the settings as recommended, the sitemap its being generated everytime I update the settings correctly but the events wont dissapear

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi again!

    Where did you place your code? The filter must be registered before sitemaps are generated. Try adding it to a custom (mu-)plugin. https://tsf.fyi/docs/filters#where

    Alternatively, you could remove support for Tribe Events entirely by excluding it at “SEO Settings > General Settings > Exclusions > Post Type Exclusions.”

    And alternatively, you could apply “noindex” to the post type at “SEO Settings > Robots Meta Settings > Indexing > Post Type Settings.” However, this will remove all events and archives of the events from search engines.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘The events calendar events not being excluded’ is closed to new replies.