Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by mariaF 6 years, 9 months ago.

Assigned support staff: Amit.

Author Posts
February 14, 2014 at 8:52 am #339679

mariaF

Hi,

I have the same problem like many before me with wanting to change the logo in the header on the front page with language. Tried a few different solutions which I have read in various threads, but don't get it to work. Just not good enough with php and need some help. The homepage is hidden link and switches between Norwegian and Swedish.

Thanks!

Maria

February 14, 2014 at 10:24 am #339781

Amit
Supporter

Hi there,

This is custom code, so please note that unless you use a child theme it might dissapear with theme updates. The way to go here is:

<?php if(ICL_LANGUAGE_CODE=='no'): ?>
<img src="Norwagian_logo"/>
<?php elseif(ICL_LANGUAGE_CODE=='se'): ?>
<img src="Swedish_logo"/>
<?php endif;?>

This code replaces wheer you have at the moment your logo call - probably in the header.php.

Cheers!

March 4, 2014 at 10:37 am #351528

mariaF

Hi! Thanks for very fast reply. Tried to use the code, but code not find where to put it with my theme. Instead hired assistance to get it done. Solved now! Cheers Maria