url rewriting – Bilingual WP site: How to achieve different URL sturcture rule based on its language?

Question

A wordpress website with bilingual setup, with three languages:

  • English (“primary language”) : “en”
  • Traditional Chinese : “zh-hant”
  • Simplified Chinese : “zh-hans”

The bilingual setup is currently achieved with the polylang plugin.

I would like to have different URL structure based on the post’s language.

For English,

example.com/blog/%category%/%post_title%

But for non-English blog post URL, I would like to use post id instead of post_title:

example.com/blog/zh-hant/%category%/%post_id%

0
Atimmy 2 months 2021-06-13T14:15:49-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse