Table of Contents

  1. Introduction
  2. Connections Menu
  3. Options Menu
  4. Tag Inspector
  5. Examples
  6. Credits
  7. Faq

Introduction

The hreflang attribute, explained in detail in this document provided by Google, gives search engines information on which language variations or geo-targeted versions the webserver should serve to the users.

The Hreflang Manager plugin generates HTML link elements with the hreflang attribute in the head of the pages available in the front-end of your WordPress installation.

Connections Menu

You can use the Connections menu to implement the hreflang attribute in any page (posts, pages, custom post types, homepage, categories, archives, etc.) of your WordPress website.

Options Menu

The Options menu includes a total of 15 options. You can hover the mouse over the question mark associated with the option to receive additional information.

Tag Inspector

The Tag Inspector is a tool that allows you to verify the correctness of the hreflang tags implemented in the pages of your website.

Enabling the Tag Inspector

To use this feature, follow this procedure:

  1. Visit the Options -> General tab
  2. Turn on the Tag Inspector toggle

Using the Tag Inspector

The Tag Inspector appears automatically in the bottom right corner of your website’s front end when a page contains at least one hreflang tag. It only evaluates hreflang tags created by this plugin. Tags that are added manually in the theme or by other plugins are ignored.

The main view of the tag inspector is called Table View, and it shows a table with the following columns:

  • Language/Locale: The hreflang ISO code of the listed page
  • URL: The URL of the listed page

By clicking on the Tag View button, you can see the HTML link elements added by the plugin to the page.

Examples

Connect two pages on the same website

Assume that inside a single WordPress installation, you have two versions of the same page, the first one is “Book” targeted for English users, and the second one is “Libro” targeted for Spanish users.

To generate the proper hreflang markup of the English version (the page “Book”), proceed to the Hreflang -> Connections menu and enter the following data:

To generate the hreflang markup of the Spanish version (the page “Libro”), enter the following data:

Connect the homepage of four different WordPress installations

In this example, we have to connect multiple websites. The website for non-targeted users where we want to place a language and country selector users is example.com.

We also own the German version de.example.com (for users that use the German language), the English version en.example.com (for users that use the English language), and the Canadian version ca.example.com (for users located in Canada that use the English language).

Proceed to the example.com WordPress back-end and enter the following data:

In the de.example.com WordPress back-end, enter the following data:

In the en.example.com WordPress back-end, enter the following data:

In the ca.example.com WordPress back-end, enter the following data:

Credits

This plugin makes use of the following resources:

Faq

Which versions of PHP are supported?

PHP 5.2 and later versions are supported.

Which versions of WordPress are supported?

WordPress 4.0 and later versions are supported.