-
Hi,
For some reason, only the post-sitemap.xml shows “couldn’t fetch” in GSC. So, I have been searching the forums to see what might have caused the issue. Based on the suggestions provided here:
https://rankmath.com/kb/exclude-sitemaps-from-caching/1- I excluded the sitemap from the cache plugins
2- I flushed the sitemap cache (as shown in the video here: https://i.rankmath.com/pipRDp)
3- I removed the RankMath transients
4- I cleared the cache/transients etc.
4- I created the file rank-math.php (in the child-theme) and added the following code:
/
**
* Filter if XML sitemap transient cache is enabled.
*
* @param boolean $unsigned Enable cache or not, defaults to true
*/
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');First, I had the code displayed on the header of the admin panel. So, I removed the rank-math.php and added the the code directly in the functions.php (in the child-theme). The notification disappeared from the dashboard.
However, it still exists whenever I click on RankMath>Dashboard and General Settings.
Also, in the admin panel > Dashboard the RankMath Overview widget is all messed up! I have attached the screenshot.
Could you please help at your earliest convenience with both issues (only post-sitemap.xml not being fetched in GSC) and also this “Filter if XML sitemap transient cache is enabled….” code being displayed messing up the dashboard widget?
Thank you for your time!
The ticket ‘Filter if XML sitemap transient cache is enabled’ is closed to new replies.