Hello,
We have shown you that this function can indeed work but due to the nature of the complexity of your website and the custom code used to make everything work this level of customization of our filters fall outside the scope of our support.
You can see the full list of available filters from our plugin here: https://rankmath.com/kb/filters-hooks-api-developer/
You can also check this page to learn how to include custom made sitemaps inside our plugin: https://rankmath.com/kb/custom-sitemaps/
Apart from this, the final customizations need to be done by you or some developer you can hire for this purpose.
Don’t hesitate to get in touch if you have any other questions.
Dear Miguel,
Let me understand if I understood you correctly:
i) Rankmath filter ‘rank_math/sitemap/entry’ does not work in this case as it is unable to eliminate from sitemap single posts. It eliminates all 3 versions (in PT, EN and ES) of every post. Right?
ii) Rankmath filter “rank_math/sitemap/xml_post_url” also does not work, because rankmath canonicals are disabled (they are disabled and I add them manually because they were wrong: all translated version of pages are canonicals, only 1 version of the posts is canonical).
So, in summary all the suggestions that you made me in the past week do not work.
Do you have any other suggestion that could work?
Therefore, I had to disable rankmath’s sitemap generator, and I used this link to generate it by scanning the site: https://www.sureoak.com/seo-tools/google-xml-sitemap-generator
It worked perfectly and it is on http://www.capitalinvest-group.com/21-12-20-sitemap-sureoak.xml
Google now has a correct sitemap, but unfortunately, I would have to update it every time a new post is added.
Any chance that rankmath could generate a correct sitemap? Anyway to correct rankmath sitemap by using any filter that could work? Any chance to make rankmath fully compatible with WP Multilang, including sitemmap generation?
Any other suggestion?
Hello,
All the filters we have available are on the page that we shared previously and the only other way to change the sitemap generation without those filters is with the custom sitemaps option we mentioned as well.
We don’t have any hidden filter or functionality related to sitemaps. All the information is on the pages we shared earlier.
If you would like the compatibility list of multilingual plugins with Rank Math you can check this page: https://rankmath.com/compatibility/
Don’t hesitate to get in touch if you have any other questions.
Thanks Miguel,
As rankmath does not offer any filter/ option to make adjustments for the sitemap, we really will have to generate the sitemap in another way (ex: using another plugin or coding it in functions.php).
What would be a advantage of including any custom generated sitemap in rankmath?
Wouldn’t it be more practice just to deactivate rankmath’s sitemap module?
Thanks
Hello,
The practicality of adding a custom sitemap to Rank Math is that you would be able to still get the perks of an automatically generated sitemap just with the custom functionality that you wanted.
Another alternative would be to create that custom functionality to generate the sitemap outside Rank Math as you correctly mentioned.
For example, if you create some sort of loop to get the appropriate URLs and add them inside the custom sitemap, that would essentially be an automatic sitemap.
Don’t hesitate to get in touch if you have any other questions.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.