Skip Navigation
Originally written
January 2, 2013
Updated
July 3, 2020

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 include the name of the post type and the page name. Typically, custom post types in different languages will look like this:

  • /houses/my-green-house/
  • /casas/mi-casa-verde/

The first part of the URL, in bold, is the post type. The second part of the URL is the page name. In this article, we will go over how to translate both parts.

Translating post type in a URL

To translate the first part of the URL, you will need to translate the post type. In order to do that, you must set the post types as translatable in WPML → Settings.

1. Check the box to enable slug translation for the site.

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 each post type to one of the translatable options and hit Save.

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

3. For each post type, select the option to set different slugs in different languages.

Translating a custom post type
Translating a custom post type

4. Enter the translations and hit Save again. On the front-end, you will now see the translated post type in your URL.

Viewing the translated post type URL
Viewing the translated post type URL

Translating page names in a URL

The second part of the URL is created from the page or post title. You can translate the title the same way you would any other page or post content, whether you use WPML’s Translation Management module or simply translate the content yourself.

The translated URL will be generated from the newly translated page title.

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

Developer Resources

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