-
Hi;
Sitemap is not working. It shows empty lines instead of the translated ones.
All the best,
Jürgen
-
Hello,
Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for the delay and for any inconvenience this issue may have caused you.
I’ve checked your sitemap, and it seems that translations of those pages were not completed. Please use the filter below:
add_filter('rank_math/sitemap/entry', function ($url){ if (isset($url['loc']) && empty($url['loc'])) { return false; } return $url; });
This should go to your theme’s functions.php, then flush your sitemap cache and clear your website’s cache.
To flush the Sitemap cache, please follow this video screencast:
https://i.rankmath.com/xXXhDtThen exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server.
https://rankmath.com/kb/exclude-sitemaps-from-caching/I hope that helps. Thank you, and looking forward to your update.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hi Reinelle,
now the english translation is not showing any more … but the empty lines an gone …
The empty lines are actually the pages that i translated but the path ist not shown …
I am using wp-optimize as chaching plug-in.
Please find the screen shots
Jürgen
Hi Reinelle,
the sitemap is better now. There are only two issue now.
– https://gelvos.com/en/ is not shown in the page-sitemap.
– https://gelvos.com/en/blog/ is shown in the post-sitemap.What can it be?
Thanks in advance.
Jürgen
Hi,
I hab another question.
Should the english pages and sites be in that sitemap or should they only be in the sitemap /en/ ?
best wishes,
JürgenHello,
Thank you for the follow-up, and sorry for the delay.
Your default language (without /en) should include the translated URL/s in the sitemap.
Rank math usually adds all your URLs under the default sitemap URLs. The translation differentiation is done using
hreflangs
added to the individual pages. Other translation sitemap URLs are automatically handled by WPML, not Rank math.Please check this guide on doing translations with Rank Math and WPML:
https://wpml.org/documentation/plugins-compatibility/optimize-multilingual-websites-using-rank-math-and-wpml/Especially under the section How Rank Math sitemaps work with WPML
I hope that helps. Thank you, and please don’t hesitate to contact us anytime if you need further assistance.
Hi Reinelle,
I did everything in the guide. WPML told me that the problem is on your side.
The sitemap https://gelvos.com/sitemap_index.xml is incorrect with this problem:
– https://gelvos.com/en/ is not shown in the page-sitemap.
– https://gelvos.com/en/blog/ is shown in the post-sitemap.In the english version of the sitemap everything is correct.
https://gelvos.com/en/sitemap_index.xmlHow is it possible that there is a difference? Can you please look into it. Especially my main page should be in the sitemap https://gelvos.com/en/
Since WPML says it is your fault and you say that is their fault it is very difficult for me. I need the problem to be solved.
WPML told me this: “There are currently several issues with RankMath and the plugin is currently undergoing a compatibility recheck.”
–> Please help me with my problem. THANKS!
all the best,
JürgenHello,
Thank you for following up, and sorry for the delay.
In this case, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
Thank you, and we really look forward to helping you.
Hello Reinelle,
can you give me please a time frame when you are going to look into it? Since I am constantly working on the page I want to make a backup before you do something and also don´t want to do things at the same time.
How big are the changes going to be and how long will it take?
best wishes,
JürgenHello,
Thank you for the follow-up, and sorry for the delay.
Unfortunately, we cannot give an ETA when this issue will be fixed.
Alternatively, you can also create a staging site with the same issue as it seems that your site is currently live. This will also avoid your site getting any issues and recommend specific troubleshooting steps. Here is a guide that could be really useful for you on how to create a staging site: https://www.wpbeginner.com/wp-tutorials/how-to-create-staging-environment-for-a-wordpress-site/
I hope that helps. Thank you, and looking forward to helping you.
Hi Reinelle,
everything is fine now.
Thanks a lot!
Greetings Jürgen
Hello,
We are super happy that this issue is already resolved. If you have any other questions in the future, know that we are here to help you.
If you don’t mind us asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
If you have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.
The ticket ‘WPML & RankMath – Sitemap with empty lines instead of translation’ is closed to new replies.