Support » Plugin: The SEO Framework » How to implement hreflang tags in sitemap?

  • Resolved paruno

    (@paruno)


    Is there any way to implement hreflang tags in sitemap?

    It is impossible to do it with blog-type multisite website, using any plugins. All the “insert code in header” plugins allow to insert specific code only in the static pages, and not the homepage, showing latest posts. Polylang and other free translation plugins also do not work properly with the multisite, and WPML is a premium plugin. It would be really great to just type the different language versions of all pages to the SEO Framework and let it do the job for you.

Viewing 1 replies (of 1 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    Adding hreflang-tags in the sitemap is a feature we’re still discussing, but thus far we forwent implementing because there’s a lot of overhead involved. It’s not easy to implement correctly (performance, getting the right links, supporting all translation plugins, etc. etc.). Plus, hreflang metatags in the header should do the trick already. See https://github.com/sybrew/the-seo-framework/issues/69.

    Alas, even if we had implemented it, it wouldn’t work in your case, since we had sought to only support Polylang and WPML with that feature.

    Currently, there’s no way to implement this via The SEO Framework itself. You’d have to rewrite our sitemap module.

    It would be really great to just type the different language versions of all pages to the SEO Framework and let it do the job for you.

    It would be! This is actually on our internal super-secret “if we ever find the time” feature-list; we don’t want to leak every idea to our competition, but you just spilled the beans 😉

    A native solution would solve all the problems users face with existing multilingual plugins. But, we’ve held back on this since it’s already on WordPress’s long-term roadmap: https://wordpress.org/about/roadmap/ (all the way at the bottom).

    Until then, for Multisite, I recommend using MultiLingualPress. It’s not a free plugin, and for many, the pricing is steep. But, it should do the trick in your scenario. https://multilingualpress.org/

    The bottom line is that there are no free solutions out there to resolve the issue you’re facing, at least, for as far as I’m aware 🙁 I think many plugin authors are starting to live by the statement: “If you’re good at something, never do it for free.”

    You might be able to work around this by using a plugin like Advanced Custom Fields (ACF). Register a field that should contain the hreflang link and its language, and then output that in the post’s header when filled in. I think you can get this custom developed for less than any of the paid plugins’ price–it should be much more performant as well!

Viewing 1 replies (of 1 total)
  • The topic ‘How to implement hreflang tags in sitemap?’ is closed to new replies.