Using IF conditional with WPML should be easy but for some reason my template stops working as soon as i place following code in footer.php or everywhere else
<?php
if (ICL_LANGUAGE_CODE == 'en') {
//english here
} else {
//other languages
}
?>
Am I missing something?
<?php if (ICL_LANGUAGE_CODE == 'en'): ?>
<!-- english here -->
<?php elseif (ICL_LANGUAGE_CODE == 'es'): ?>
<!-- spanish here -->
<?php endif; ?>
<!-- ======== Or ======= -->
<?php if (ICL_LANGUAGE_CODE == 'en'): ?>
<!-- english here -->
<?php else: ?>
<!-- spanish here -->
<?php endif; ?>