• Resolved dmitriy1993

    (@dmitriy1993)


    Good day, I have encountered a problem. I have 6 languages ??on my site, but there is no translation for some content and the previous web developer decided to make 404 for such pages. At the same time, Yoast Seo generates a Sitemap that contains all pages, including 404. Yoast settings do not allow you to remove a separate translation from the Sitemap, because All translated pages have the same ID, which leads to complete exclusion from the Sitemap. Perhaps you have some kind of tool that allows you to exclude a specific localization / link from the generated Sitemap?

    Link to screenshot

    • This topic was modified 5 months, 3 weeks ago by dmitriy1993.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Magazine3

    (@magazine3)

    Hi, Thank you for reaching out to us. Could you please share the URL once so we can check.

    Thread Starter dmitriy1993

    (@dmitriy1993)

    @dmitriy1993 , Hi! I’m facing the same problem. You’re right – in Yoast Seo, the hook deletes all translations at once, but some specific translation cannot be deleted. I think this is a Yoast Seo problem. I solved the problem this way – I removed the sitemap generation from Yoast and installed the XML Sitemap Generator for Google plugin. I hope this helps you.

    Thread Starter dmitriy1993

    (@dmitriy1993)

    @maximbelenkii , Thank you very much for your advice, but I think that installing even more plugins to cover the problems of other plugins is bad practice ??

    Regarding the Yoast Seo plugin and its tools, I agree with you; it does not allow you to perform all the necessary manipulations with links in the sitemap. It looks like the function it provides looks for the post ID by link and hides all links that relate to the post. And it works correctly if each translated version of the post has its own ID, for example, as is implemented in Polylang and similar plugins.

    It seems to me that the solution should be simple and elegant. For example, in https://github.com/VaLeXaR/wp-multilang/blob/master/includes/integrations/class-wpm-yoast-seo.php line 293, the add_alternate_opengraph_locale() function contains a check for the value of the post metadata that is being added from the corresponding menu in the sidebar. Works correctly for links with the hreflangs attribute.But in the same file on line 178, there is a function add_alternate_sitemaplinks(), which is apparently responsible for displaying links in the yoast seo sitemap. This function does not bind to metadata like the function above. Perhaps this will solve the problem.

    @magazine3, what do you think as a developer?

    Plugin Author Magazine3

    (@magazine3)

    @dmitriy1993 @maximbelenkii : Hi, we apologize for the delayed response and thank you for your suggestion. We have already raised a GitHub ticket regarding this concern, and it will be addressed in our upcoming update. We kindly request your patience in the meantime.

    Here is the ticket: https://github.com/ahmedkaludi/wp-multilang/issues/84

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.