I need to give each page a custom/different page template for every language page in WPML.

eg: Let i have a test page in English and french. Is there any way out so that in English i give sidebar template while same page in french don’t have sidebar template.

Note: Solution should not be any core condition to be put in code.

Thanks in advance.

2 Answers
2

You can accomplish different sidebar content per language with either the plugin Widget Logic, or with the Dynamic Widgets plugin

Alternatively you can make different sidebar templates per language and use a conditional on the language:

if(ICL_LANGUAGE_CODE=='en'){
get_sidebar('en');
}
if(ICL_LANGUAGE_CODE=='fr'){
get_sidebar('fr');
}

Leave a Reply

Your email address will not be published. Required fields are marked *