Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing hfreflang attribute for content's own language #114

Closed
Biont opened this issue May 26, 2015 · 1 comment
Closed

Missing hfreflang attribute for content's own language #114

Biont opened this issue May 26, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@Biont
Copy link
Collaborator

@Biont Biont commented May 26, 2015

In Mlp_Hreflang_Header_Output::wp_head() resp. Mlp_Hreflang_Header_Output::http_header()
only the available translations are searched - excluding the current base content.
That should be included, though :

If you have multiple language versions of a URL, each language page must identify all language
versions, including itself.  For example, if your site provides content in French, English, and Spanish,
the Spanish version must include a rel="alternate" hreflang="x" link for itself in addition to links to the
French and English versions. Similarly, the English and French versions must each include the same
references to the French, English, and Spanish versions.

https://support.google.com/webmasters/answer/189077?hl=en

So maybe Mlp_Hreflang_Header_Output::get_translations() should pass array( 'include_base' => TRUE ) when fetching the available translations:

https://github.com/inpsyde/multilingual-press/blob/36d312c80c053e4932282df401cd2a776d285511/inc/hreflang-header/Mlp_Hreflang_Header_Output.php#L98

@Biont Biont changed the title Fehlendes Hreflang-attribut für eigene Sprachversion Missing hfreflang-attribut for content's own language May 29, 2015
@Biont Biont changed the title Missing hfreflang-attribut for content's own language Missing hfreflang attribute for content's own language Jun 17, 2015
@bueltge bueltge added this to the 2.2.0 milestone Jun 17, 2015
@bueltge bueltge added the feature label Jun 17, 2015
@Biont Biont added the needs testing label Jun 25, 2015
tfrommen added a commit that referenced this issue Jun 26, 2015
@tfrommen tfrommen removed the needs testing label Jun 26, 2015
@tfrommen

This comment has been minimized.

Copy link
Contributor

@tfrommen tfrommen commented Jun 26, 2015

Tested, works, closed with f0b6e57.

@tfrommen tfrommen closed this Jun 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.