最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

slug - Adding language based URL structure

programmeradmin0浏览0评论

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:

my-we-site/en/contact
my-we-site/de/contact

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?

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:

my-we-site/en/contact
my-we-site/de/contact

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?

Share Improve this question asked May 16, 2020 at 14:46 santasanta 1011 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 1

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).

发布评论

评论列表(0)

  1. 暂无评论