Hi there,
I’m sorry, but I don’t follow.
You have several reported hreflang tags due to paged pages, right? This can be solved with the code snippet in the other thread that you linked to.
Then, you also have problems with, for example, the About page…? That’s no wonder, because the English page at http://blumudus.com/about/ lists for Italian the URL http://blumudus.it/chi-sono/. When you go to that URL, however, the English counterpart is said to be found at http://blumudus.it/bluemood/about/ (instead of http://blumudus.com/about/). So, why is this .it/bluemood/ instead of .com/? That’s another (sub-directory) site in your network, right?
When I (try to) go there, I get redirected to http://blumudus.com/about/.
Please have a look at your sites, and at the reported posts and pages, and their according translations. If everything looks okay, feel free to report back with a little more information. 🙂
Thanks,
Thorsten
Strange, I got email notifications for some other topics in this forum, but I missed this reply… I assumed you had no answer for it. Yesterday I just solved the problem, now I come here and… voilà! You were pointing me to it 3 weeks ago! Stupid me!
Of course, the problem was that in the netw. admin settings the directory was still indicated, instead of the .com pointing to it!
For some reason Google was testing only some of the pages, thus creating the false impression that only part of them had problems!
Thanks anyway!
Ahem… I’m still here… I tried the solution proposed in the other topic https://wordpress.org/support/topic/hreflang-on-paginated-blog-pages/
i.e.
add_action( 'wp_loaded', function () {
if ( is_paged() ) {
add_filter( 'mlp_hreflang_html', '__return_empty_string' );
add_filter( 'mlp_hreflang_http_header', '__return_empty_string' );
}
} );
both with the “Code Snippets” plugin, and with a tentative inserting it directly in the functions.php, but the paginated pages still return the hreflang relative to the homepage.
Am I the only one bothered by this? Google Webmaster tools seems to make a big deal of it.
Anyway, I don’t understand how the code you suggested isn’t executed.
Hi there,
what exactly is not working (as you would like it to)?
Are you visiting a paginated post/page/archive (on a page other than the first one) and you still see <link rel="alternate" hreflang="" /> tags in your markup?
Are you using some sort of caching (e.g., a page cache)?
Best regards,
Thorsten
Hi,
the problem is that Google insists I’ve got a bunch of hreflang errors: http headers without return tag.
On page 2 of the home, it still points to the generic home page, even after putting that code to fix it, as I said.
<link rel="alternate" hreflang="en-US" href="http://blumudus.com/">
<link rel="alternate" hreflang="it-IT" href="http://blumudus.it/">
I plan to cache pages in the future, not for now. I’m behind Cloudflare free, so that html is not cached (and the problem isn’t going away even after a few days).
Additionally, for some reason Google indicates further errors. After I corrected the setting, substituting the directory path by putting the domain: http://blumudus.com/about/ in place of the old http://blumudus.it/bluemood/about/ , well, the tags are correct,
<link rel="alternate" hreflang="it-IT" href="http://blumudus.it/category/scienza-tecnologia/">
<link rel="alternate" hreflang="en-US" href="http://blumudus.com/category/science-tech/">
but Google insists on reporting a hreflang error on blumudus.com, with this indication:
/category/science-tech/ corresponds to
http://blumudus.it/category/scienza-tecnologia/
I don’t know what to say…
Thanks for your patience!
Any chance I could have a look at both your WordPress and your server (meaning either FTP or SSH, if you have that)?
In case you want to provide any login credentials, you can do so via mail to: support@multilingualpress.org
I don’t know the Snippets plugin, but maybe it executes the code too late, so the wp_loaded has already been fired…?
But if you also tried and put the exact same code into your theme’s functions.php file, this really should be working… :/
Problem solved!
Many thanks, it seems that Google Search Console was just very slow in its assessing the effect of the corrections. They still marked a wrong tag 2 days ago, after a whole month…
Anyway, I’ve also appreciated that the pagination issue was resolved with the latest plugin update.
Thanks again!