• Resolved ishitaka

    (@ishitaka)


    wp-sitemap.xml has been disabled, but wp-sitemap.xml in robots.txt has not been disabled.

    Sitemap: ***/wp-sitemap.xml

    Isn’t the point of the wp_sitemaps_enabled hook slow?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ishitaka

    (@ishitaka)

    Supplement

    wp_sitemaps_enabled is likely to be because the position of hooking the system is a little later than expected.

    Currently, I am taking measures by adding the following code to the theme’s functions.php.

    add_filter( 'wp_sitemaps_enabled', '__return_false' );

    I had the same issue in my production environment (but not my local testing environment). The wp-sitemap.xml is still listed in robots.txt along with the one generated by this plugin. Adding the filter in my own theme made it disappear.

    Even putting this filter elsewhere in the plugin file made it disappear properly. Seems like an easy fix to just change the position of the filter call?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP sitemap for robots.txt’ is closed to new replies.