• Resolved melriks

    (@melriks)


    Is there a filter to disable the sitemap output? I’m having a problem with relative URLs on my sitemap and would like to disable TSF sitemap for troubleshooting.

Viewing 1 replies (of 1 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    You can disable TSF’s sitemap via the options at “SEO Settings > Sitemap Settings > General > Sitemap Output” — WordPress 5.5+ Core Sitemaps will take its place, though.

    If you wish to use a filter, you can use this:

    add_action( 'the_seo_framework_after_front_init', function() {
    	remove_action( 'template_redirect', [ tsf(), '_init_sitemap' ], 1 );
    	remove_filter( 'wp_sitemaps_enabled', '__return_false' );
    } );

    The filter doesn’t concern the robots.txt output, so you might still find a link there to a non-existing sitemap.

Viewing 1 replies (of 1 total)
  • The topic ‘Disable Sitemap function’ is closed to new replies.