开发者

Wordpress rewrite url of all post /pages depending on a session variable

开发者 https://www.devze.com 2023-02-26 15:25 出处:网络
Hi guys wondering if you can help me out? I\'ve made a custom translation function on a WordPress template and would like to rewrite the URL to pre-append the language code depending on what been sel

Hi guys wondering if you can help me out?

I've made a custom translation function on a WordPress template and would like to rewrite the URL to pre-append the language code depending on what been selected for example.

the original URL would look something like

http://[DOMAIN]/[OrignalPath]

If you select FR and the URL would rewrite the URL to

http://[DOMAIN]/fr/[OrignalPath]

But still function and display the same content as the default UR开发者_运维问答L.

I would like this to work for pages as well as post.

Thanks Matt

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号