Skip Navigation
Updated
June 2, 2021

WPML lets you use unique URLs for custom content in different languages. This includes translating the post slug, as well as the name of the custom post type.

Understanding URLs

URLs for custom post types have two parts:

  1. Name (slug) of the custom post type
  2. Title (slug) of the post

Here’s an example of a custom post type’s URL in two different languages:

An example of a URL in English and Spanish with parts coming from the custom post type's name and the post's title name
An example of a URL in English and Spanish with parts coming from the custom post type’s name and the post’s title name

Translating a post type’s URL

To translate the first part of the URL, you need to set up the custom post type to be translatable in WPMLSettings.

1. Scroll to Slug translations. Check the box to enable translation for your site’s custom post and taxonomy slugs. Click Save.

Enabling translation of custom post and taxonomy base slugs
Enabling translation of custom post and taxonomy base slugs

2. In the Post Types Translation section, set your custom post type to one of the Translatable options and click Save. In our example, our custom post type is Brushes.

Setting the custom post type to one of the translatable options
Setting the custom post type to one of the translatable options

3. After clicking Save, the option to set different slugs will appear. Click on it, and type in the translation for the custom post type slug.

Translating the custom post type slug
Translating the custom post type slug

4. Enter the translations and hit Save again. On the front-end, the translation for your custom post type should appear in your URL.

Viewing the translated custom post type in the URL
Viewing the translated custom post type in the URL

Translating the URL of a post or page

The second part of the URL comes from the post’s or page’s title. The translated URL will be automatically generated from the newly translated page title.

Viewing the translated page name in the URL
Viewing the translated page name in the URL

Sending Post or Page slugs to Translators

Post and Page slugs are automatically created from the title. If you want them available as slugs for your translators to translate, use these steps:

1. Go to WPMLSettings. Scroll to Translated documents options.

2. Under Page URL, choose the Translate option. Click Save.

Setting the option to Translate
Setting the option to Translate

3. After doing this, you can use WPML’s Translation Management module to send your content to translators.

Developer Resources

If you are a developer, you can read more about manually translating slugs for custom post type archives in our Developers Information section.