I'm working on a multilingual site. I already have content. I need to arrange my pages based on the language by adding a language code before page name, like:


I looked into Permalinks but I couldn't really get it to work that way. Can I add multiple Category base for each language?

What am I missing?


If you're talking about pages, you can create a parent page with the country code as it's URL and set all the other pages as children of it. You could even make that page the homepage for that language.

If you mean posts, you could create a custom taxonomy and follow these instructions to add it to your permalink structure.

There are also lots of multilingual plugins that might help you, such as Polylang and WP Multilang (this one looks like it might support the language code in the URL).

  • Thanks, this is a great idea to create a parent, however, thinking further I don't want to sent user to the parent every time they toggle language. I'm leaning towards some sort of custom PHP solution where I will add a link and when the link is clicked just replace language handle and redirect. Trying to figure to how to best do it, as a widget or a plugin. I don't want it to be tied in with a theme, in case they change and wipe it out. – santa May 17 '20 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.