-
AuthorPosts
-
November 15, 2017 at 12:36 pm #877062
Hi,
If I want to place a different link on footer.php after line 102 who switch with a WPML language I have an error. Could you tel me wath’s wrong ?
This is the code I would like to add :
<?php if(ICL_LANGUAGE_CODE==’fr’) : ?>
link A
<?php else : ?>
<?php if(ICL_LANGUAGE_CODE==’en’) : ?>
Link B
<?php else : ?>
<?php if(ICL_LANGUAGE_CODE==’nl’) : ?>
Link C
<?php else : ?>
<?php if(ICL_LANGUAGE_CODE==’de’) : ?>
Link D
<?php endif; ?>I have an error on line 166
<?php } //end nosocket check
Do you have an idea ?
Thank you for your help !
David
November 15, 2017 at 4:16 pm #877123Nobody have an idea ? A developer or a person who have facilities with PHP code.
November 16, 2017 at 2:37 am #877308Hey David,
Please try using the code as following
<?php if(ICL_LANGUAGE_CODE=='fr'); ?> Link A <?php elseif(ICL_LANGUAGE_CODE=='en'); ?> Link B <?php elseif(ICL_LANGUAGE_CODE=='nl'); ?> Link C <?php elseif(ICL_LANGUAGE_CODE==''); ?> Link D <?php endif; ?>If that too does not help, please post FTP and WP admin logins here privately so we can look into it.
Best regards,
YigitNovember 16, 2017 at 10:27 pm #877797Parse error: syntax error, unexpected ‘elseif’ (T_ELSEIF) in … footer.php on line 107
Could you give me your IP to give your an FTP access ?
November 16, 2017 at 11:02 pm #877817Hi,
Please use the code as following
<?php if(ICL_LANGUAGE_CODE=='fr'){ echo 'Link A'; } if(ICL_LANGUAGE_CODE=='en'){ echo 'Link B'; } if(ICL_LANGUAGE_CODE=='nl'){ echo 'Link C'; } if(ICL_LANGUAGE_CODE=='de'){ echo 'Link D'; } ?>Tested :)
Best regards,
YigitNovember 17, 2017 at 12:13 am #877858Yes, thank you for your help. Resolved.
Have a nice day !
November 17, 2017 at 3:25 am #877883Hi,
You are welcome! :)
For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)Best regards,
Yigit -
AuthorPosts
- The topic ‘Footer.php, some help to add an "php if language"’ is closed to new replies.
