-
-
Hello,
I would like to have a logo in a language, and a different one in another language, using WPML.
I found this code, but I’m not certain where to add it in Specular:
<div id=”top”>
<?php if(ICL_LANGUAGE_CODE==‘en’): ?>
<?php elseif(ICL_LANGUAGE_CODE==‘fr’): ?>
<?php endif;?>
</div>Help would be much appreciated!
- This topic was modified 9 years, 2 months ago by martin.lallier.
-
-
Hello,
I have edited the current header.php file to match your requirements.You can find the entire files code, in this link:
https://codeshare.io/5Zpw67The section for the logo is the below. Change the language code and logo image source link to your need:
<?php if(!isset($css_class)) $css_class=''; ?> <div id="logo" class="<?php echo esc_attr($css_class) ?>"> <?php if ( ICL_LANGUAGE_CODE=='sq' ) { ?> <img src="https://hudsonsbayfinancial.com/wp-content/uploads/2016/04/hbfs-logo-french.jpg" /> <?php } else if ( ICL_LANGUAGE_CODE=='fr' ) { ?> <img src="https://localhost/specular/wp-content/uploads/2014/09/shutterstock_120154516-compressed-2.jpg" /> <?php } else{ echo codeless_logo(); } ?> </div>
Save changes and make sure to save a backup of the edited file for future theme updates.
Best regards!
-
Has this changed? I cannot find a call to logo section in the header anymore. Where has it gone? I updated the theme & the edit got over written. This should really be coded into the next update its a bit hard to have to find & update this each time I update the theme.
-
Hi,
Kindly open your own ticket so we can answer accordingly.
Thanks
-
You must be logged in to reply to this topic.