Translating Custom Post Types
On this page
A custom post type is any content type your theme or a plugin adds next to Posts and Pages:
Projects in a portfolio theme, Events in an events plugin, Team members, Services,
Testimonials. The plugin translates them the same way it translates posts and pages – there
is no separate mode to learn.
Translating custom post types by hand is part of the free version. Translating them
automatically with AI – one item, a selection, or everything on save – requires PRO.
#One item, every language
The plugin does not create a copy of a project for each language. There is one project, and its
translations are stored alongside it and shown in its place under the language prefix
(/en/…). That has a few consequences worth knowing. (If you run languages on subdomains or separate
domains instead – see Languages on Subdomains and Separate Domains – read /en/… as the same path
on the English host, for example en.example.com/….)
- Everything that is not text is shared. The featured image, the gallery, the date, the
categories it belongs to, the order, custom settings such as a “featured” switch – all of it is
set once, on the original, and every language shows the same thing. The exception is a custom
field you name under Extra meta keys (see below): that one gets its own value per language,
even when it is an image or a number. - Publishing is shared too. A draft project is a draft in every language; publish the
original and the translations go live with it. - Deleting the original deletes its translations. There is nothing left to translate.
#Turning it on
Go to LATW Multilingual → Settings → Translation and look at Content Types. Every public
content type on the site is listed there, the custom ones included, and a ticked type gets a
LATW Translations box on its edit screen and its own tab on the Posts page.
All of them are ticked on a fresh install. If you install a theme or plugin later, come back here
and check that its content type is ticked – a type that is not ticked has no LATW Translations
box and no tab on the Posts page, so its items cannot be translated.
The list shows public types only – the ones that have their own pages on the front end. A type
a plugin uses only internally (form entries, logs, settings) has nothing a visitor reads, and is
not offered.
#What gets translated
Open a project and use the LATW Translations box, or go to LATW Multilingual → Posts, pick
the content type’s tab and click the pencil next to a language. The translation opens in the same
editor you use for the original – the block editor, or your page builder if the project is built
with one (see the Page builders setting under Settings → Translation).
You translate:
- Title, content and excerpt.
- The URL slug – the last part of the address,
/en/projects/my-project/. In the block
editor it is the URL slug field in the Translation URL panel of the sidebar; in any
editor it is also at the top of the segment editor (see Translating Elementor). Leave it empty
and the original slug is used. - Custom fields that hold text – ACF text fields, fields declared by the theme or plugin in
itswpml-config.xml(SEO titles and descriptions among them), and any meta key you name under
Extra meta keys on Settings → Translation. A field that is not covered stays in the
original language – if one detail of a project refuses to change language, this is usually why.
The categories and tags of a custom post type (a “Project category”, say) are translated
separately, on the Taxonomies page – their name, description and slug. Translate a category
once and every project in it shows the translated name.
#Labels of the content type itself
The theme also shows text that belongs to the content type rather than to any one project: the
heading of the archive page (“Projects”), the singular name (“Project”) some themes print in
breadcrumbs or above a single item, “No projects found”. WordPress keeps these in the content
type’s registration, not in a post, so they are translated on their own.
Go to LATW Multilingual → Strings and set the Type filter to Post types. Each custom
post type is one row; open it to translate its names and labels. The list appears when
Custom post type labels is enabled under
LATW Multilingual → Settings → Translation → Other objects.
#Addresses: a different URL base per language
Available in the free version (version 2.6.3 and later).
The address of a project has two parts after the language prefix: the base the theme gives
the content type, and the project’s own slug.
https://example.com/progetti/nome-progetto/ (Italian, the default language)
https://example.com/en/progetti/project-name/ (English, base not translated)
https://example.com/en/projects/project-name/ (English, base translated)
On a site with languages on subdomains or domains the same addresses read
en.example.com/projects/project-name/. A base that belongs to another language, requested on the
wrong host, is redirected (301) to the base that host’s language uses.
The project’s slug is translated with the project (see above). The base – progetti – is set by
the theme or the plugin that registered the type, often in the theme options, and it is the same
for every language until you translate it.
To translate it, go to LATW Multilingual → Strings, set the Type filter to Post types
and open the content type. Under its labels there is a URL base row: the original base on the
left, one field per language. Type projects in the English column and save.
- Leave a field empty to keep the original base in that language.
- The archive follows the base. When the content type has an archive at its base, it moves
too:/en/projects/, with its pages (/en/projects/page/2/) and feeds. - Old addresses keep working. A visitor or a search engine arriving at
/en/progetti/nome-progetto/is sent to/en/projects/project-name/with a permanent (301)
redirect, so existing links and rankings are not lost. - Links follow automatically. Menus, the language switcher,
hreflangtags, the sitemap and
links typed into your content all point at the translated address. - The default language keeps the theme’s own base. Change the base in your theme options and
the default language follows it. The translated bases stay as you set them, so check them after
such a change. - You can use a path with several parts, such as
our-work/projects. Spaces and capital letters
are turned into a normal URL form when you save.
#What the URL base will not do
- It is entered by hand only. AI translation (PRO) never fills or changes the URL base.
The base is part of the address of every item of the type, and a different wording on the next
translation would move all of them at once. Translate it once, deliberately. - No two types can share a base. If another content type already uses
projectsin that
language – as its own base or as its translated one – the value is refused with a message, and
the previous one is kept. - Choosing a base that is also the slug of a page makes the two compete for the same address.
When the content type has an archive, the archive wins and the page becomes unreachable in that
language. Pick a different base, or rename the page. - Bases of categories and tags are not translated.
/en/project-category/web/keeps the
originalproject-category, although the category’s own slug (web) can be translated on the
Taxonomies page. - An archive at a different address than the base – a content type registered with an
archive at, say,/all-projects/while its items live under/projects/– is not moved; only
the items are.
#Untranslated items
A project that has no translation in a language is handled by two settings under
LATW Multilingual → Settings → Languages:
- Missing translation decides what a visitor gets on the project’s own page in that language:
the original content, a redirect to the default language, or a 404. - Untranslated posts in listings decides whether the project appears on the content type’s
archive and in other lists of projects (including a page builder’s posts widget) in that
language. With Show only posts translated into the active language, an untranslated project
simply is not listed.
#Translating with AI (PRO)
With PRO, custom post types are translated exactly like posts:
- From the Posts page, the content type’s tab: translate one item, or tick several and use
Translate Selected. - Automatically, with Automatically send a post for translation when it is saved or published
under LATW Multilingual → Settings → Translation prompt. - The translated slug of each item can be generated for you from the translated title – turn on
Localize URLs (slug) on the same screen. A slug is only generated when the translation does
not have one yet, so an address never changes behind your back.
The labels of the content type on Strings → Post types can be translated with AI too. The
URL base is the exception, for the reason given above.