Open JayHoltslander opened 7 years ago
So the current logic adds hreflangs if you enable the 'rewrite' logic in the UI. However a specific toggle to control this was added to the config, but not enforced (see https://github.com/transifex/transifex-live-wordpress/blob/9229557b31373784225f57ff53fffc3f4ab8aaf9/includes/transifex-live-integration-defaults.php#L118)
I don't remember why I pulled it out specifically (maybe because hreflangs are only able to properly generate if you are using the rewrite logic, so why not just always do it if you can), but it should be a simple change to also add a logic check for that setting without commenting the render code in includes/lib/transifex-live-integration-hreflang.php
Unfortunately adding a control for this in the admin UI is considerably less simple.
It would be nice if the option to use or not use alternate hreflang was available as an on/off selection within the plugin's settings.
On this page "How To Make Sitemaps In Multiple Languages With WordPress" it reads...
So it would seem that things are currently set up fine by Transifex. HOWEVER, we would prefer to utilize multilingual sitemaps over the hreflang in the head method.
Justifications:
Which is the best choice for SEO sitemap for multilingual website? "The Official Webmaster Tools blog explains the advantages of using the multilingual sitemaps declaration rather than on page: http://googlewebmastercentral.blogspot.co.uk/2012/05/multilingual-and-multinational-site.html"
Multiple XML Sitemaps: Increased Indexation and Traffic "...sure enough, the number of pages sending traffic shot up, more than doubled (486 to 1240). The same with keywords sending organic search traffic, more than doubled (548 to 1347). Nothing could be attributed to a fluke keyword or page, just everything went up. This is the power of good indexation and giving the search engines some help."
Use a sitemap to indicate alternate language pages "If your site targets users in many languages and, optionally, countries, you can use Sitemaps to provide Google with rel="alternate" hreflang="x"."
Currently we can disable it within
includes/lib/transifex-live-integration-hreflang.php
by commenting out lines 114-138 but that will be undone by the next plugin update.Aside: Yoast SEO doesn't have support for building multilingual sitemaps. They need to be generated with another tool like Dynomapper (Which does detect Transifex' multilingual pages and builds a sitemap including them.)