0

I have this multilingual website. Is there a way I can change the logo to a different logo after I switch to "Arabian?"

I am using Polylang plugin at the moment and this is what I have scrummed together:

if (pll_default_language() == 'lang1') { ?>
    <img src="http://umar-project.mlab.napravi.online/wp-content/uploads/2018/06/logo-white-eng.png" alt="">
    <?php } else { ?>
     <img src="http://umar-project.mlab.napravi.online/wp-content/uploads/2018/06/logo-whiteara.png" alt="">
    <?php } ?>

I'm using WordPress. Can anyone help me?

upss1988
  • 173
  • 3
  • 14

2 Answers2

0

Instead of pll_default_language use pll_current_language.

pll_default_language will return always the same value, even when you change your website language.

kierzniak
  • 606
  • 5
  • 15
0

i use get_bloginfo('language') for check polylang as

<?php
$currentlang = get_bloginfo('language');
if($currentlang=="en-GB") { ?>

<?php } elseif($currentlang=="pl-PL") { ?>

<?php } ?>
DinhCode
  • 110
  • 10