How to Translate a Custom Blog Post URL Structure With WPML

Quick Summary
- Set the custom permalink structure to /blog/%postname%/ under Settings > Permalinks to move English posts under /blog/.
- WPML translates post slugs but not the fixed /blog/ text in the permalink structure, and registering blog as a string doesn't change the URLs.
- For a different base per language, use a custom post type with the rewrite slug blog and translate that slug in WPML's Post Types Translation settings.
To add /blog/ to your WordPress post URLs on a WPML site, change the permalink structure:
- Go to Settings > Permalinks.
- Under Custom Structure, enter:
/blog/%postname%/ - Save changes. This changes your English post URLs to /blog/{slug}/.
What WPML translates in a blog permalink
WPML translates each post’s own slug: when a post is translated, WPML builds the translated slug from the translated title. The /blog/ part is different. It’s fixed text in the permalink structure, not the slug of a post type or taxonomy, and WPML doesn’t translate it. Every language keeps /blog/, so a translated post gets a URL like /ar/blog/{translated-slug}/ when WPML puts each language in its own directory.
Registering the word as a string, for example with WPML’s wpml_register_single_string action, doesn’t change that. The string shows up in WPML > String Translation and you can translate it there, but nothing uses that translation when WordPress builds or reads post URLs.
If you need a translated base
WPML can translate the base slug of a custom post type. If each language needs its own base, publish the blog posts in a custom post type registered with 'rewrite' => array( 'slug' => 'blog', 'with_front' => false ). The with_front setting stops WordPress from adding the /blog/ of your permalink structure in front of it a second time. Then, with WPML String Translation active:
- Go to WPML > Settings > URLs and SEO, turn on Translate base slugs of custom post types and taxonomies and save.
- In WPML > Settings > Post Types Translation, set the post type to Translatable – only show translated items and save.
- Click Set different slugs in different languages under the post type, enter the slug for each language, for example مدونة for Arabic, and save.
Existing posts have to be moved to the new post type. Because the English base is still blog, English post URLs keep the /blog/{slug}/ form.
Related articles
- changing a custom post type’s URL slug: the same kind of URL change for custom post types
- fixing 404s by flushing rewrite rules: what to do if the new URLs return Page not found

