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

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.

Read More

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

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

Thanks
Matt

Related posts

Leave a Reply