Search code examples
wordpressqtranslate

Wordpress - qTranslate plugin - how to force redirect to home page when language is switched


I'm trying to set up a simple multi-language community website. On this website, I have contents available in multi-languages thanks to qTranslate. A "Language Switcher" is added at the footer and is displayed in all pages.

What I need now is to re-direct users to the home page when they switch to another language. I've spent hours searching for the solution in google, but in vain.

Does anyone know how to redirect to home page when language is switched using qTranslate?

Thank you very much.


Solution

  • Just use <?php echo home_url(); ?>, not

    <?php bloginfo('home'); ?>