1. Documentation /
  2. MultilingualPress External Sites support

MultilingualPress External Sites support

From MultilingualPress version 4.3.0 onwards, there’s an option to enable a feature that connects source posts from a network subsite with MultilingualPress installed to a page on an external website.

Setting up an External Site

↑ Back to top

First, proceed to the Network dashboard and access the MultilingualPress admin panel to activate the module (MultilingualPress Set Up). Then, access the MultilingualPress admin panel. Once inside, you’ll want to select the External Sites checkbox, as demonstrated in the figure. Finally, simply press the Save Changes button to activate the module.

Activate the External Sites module

To access the External Sites section and create an external site link, click on the ‘External Sites’ link in the left menu. In this case, we will create a link to a specific page on an Italian newspaper website.

Create an External Site

To automatically send visitors to another website, ensure you’ve turned on the ‘Redirection’ option in MultilingualPress settings.

Activate Redirection module in MultilingualPress Settings

In this specific situation, you’ll see the choice for automatic redirection in the External Site creation form, just like the image below.

Activate redirection

Remember to check the box “Enable Automatic Redirect.” This will enable automatic redirection to the External Site for users whose language matches the one set for that particular external site.So, an External Site is defined by the following parameters:

  • Site URL (required): This sets the URL of the external site where users will be redirected.
  • Site Language Name (required):  You can name the external link for easy backend editing or clear labeling in the language menu.
  • Site Language Locale (required): This specifies the locale associated with the language of the external site.
  • Enable Hreflang: This option allows you to use the hreflang attribute for language and regional targeting.
  • Enable Automatic Redirect: This choice lets you automatically redirect users, but it’s only visible if the Redirect module is activated in MultilingualPress settings.

An additional dropdown menu appears in the Redirection tab if you activate the “Enable Automatic Redirect” option in MultilingualPress settings. You can select one of the defined External Sites from this menu as the fallback external redirection link, as illustrated in the image below.

Redirection: External fallback site

Referencing a post to an External Site

↑ Back to top

If you have a page or post created on one sub-site, and go into edit mode for that post, you’ll find a new section with MultilingualPress translation meta boxes. In this section, you’ll see the External Sites you’ve defined.

External sites translation metabox

If you don’t enter a URL in the field for the External Site, the translation link will direct users to the URL set in MultilingualPress settings by default. However, if you want to specify a different URL, you can fill in the field next to the corresponding External Site name.

Adding an External Site to the language menu

↑ Back to top

Once you’ve configured the External Site redirection feature and correctly linked it to a post, you’ll want to add a new element to the language menu. This element allows users to switch manually to the translation managed by the External Site.

For instance, if your original post is titled “India on the Moon” and it’s linked to an article on an external Italian site, you can update the language menu to include an option that allows users to switch to that site manually. This can be done by following the instructions provided in the accompanying image.

Add an External site to the language menu

Pressing the Save Menu button, the menu is updated. The language menu lets users select the Italian External Sites directly from the front end.

Menu with the External Site switch link