<li><a href="<?php echo site_url('test-eng'); ?>"><?php _e('test')?> </a></li>

I have the code above, that redirect me on my page-eng. If i have a translated version of my page in French, how to write the code to detect when i click on link to redirect me on English page, but when i click on translated page to redirect me on French version?

  • try this <li><a href="<?php echo site_url('/test-eng/'); ?>"><?php _e('test')?> </a></li> – user147874 Feb 5 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.