Site Map Error, help

Posted in: Newsmag
Post count: 322

add_filter( ‘rank_math/sitemap/enable_caching’, ‘__return_false’);

[ A site map error has caused the source to be entered within the theme. Where should I put it? ]

Post count: 27744

Hello,

If you have an error there, the code is incomplete, or some special characters can cause the issue, please remove it and add it again
like in this guide https://rankmath.com/kb/custom-sitemaps/ -> https://rankmath.com/kb/fix-sitemap-issues/
Also, you should create the file using the FTP Access to ensure it works well.

Thank you!

Post count: 322

Anamaria THANK ~~

I went to the link you gave me and saw the tutorial. There are no things related to our News Mac theme, so I still can’t figure it out. Please let me know how you can apply it to our theme.

Post count: 20685

Hi,

I see you did it correctly, exactly like mentioned in their guide https://rankmath.com/kb/filters-hooks-api-developer/

And it seems to work. If I test with a cache checker, for example the homepage is cached https://prnt.sc/Hi5AC1cf2mje And if I check the sitemap if it not cached https://prnt.sc/U9R5HamZpcfx So it seems to have worked. Is the code added in the file now?

Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.