-
AuthorPosts
-
February 2, 2016 at 2:56 pm #576444
Hi Guys.
Apologies! But Im not sure who to contact here. I have the Polylang plugin installed into my website. I want the logo to change for each different language. I tried this solution but it didnt work. > http://support.pojo.me/docs/polylang-change-logo-every-language/
Not sure if its an Enfold issue?
February 2, 2016 at 3:59 pm #576507Hey zedduo!
Please add following code to Functions.php file in Appearance > Editor
function show_current_language() { global $curlang; $curlang = $this->curlang->slug; } add_filter('avf_logo','av_change_logo'); function av_change_logo($logo) { if($curlang == "en") { { $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png"; } if($curlang == "af") { $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png"; } return $logo; }
and change logo links as needed
Best regards,
YigitFebruary 3, 2016 at 5:39 am #576873Hi Yigit
Thanks for the reply!!
Unfortunately, that didn’t work. Im getting a syntax error. Not sure if its missing something else. Im using a Child theme and I dont have anything in the functions.php file :)
- This reply was modified 8 years, 10 months ago by zedduo. Reason: added child theme note
February 4, 2016 at 5:06 am #577540Hi,
Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.
Regards,
RikardFebruary 4, 2016 at 8:51 am #577642Hi Rikard.
Thanks for the reply! See below.
February 8, 2016 at 6:54 am #579375Hey!
We modified the code in the functions.php file a bit.
add_filter('avf_logo','av_change_logo'); function av_change_logo($logo) { $lang = pll_current_language('locale'); switch ($lang) { case 'en_US': $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png"; break; case 'af': $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png"; break; } return $logo; }
Please adjust the the logo image url.
Regards,
IsmaelFebruary 8, 2016 at 8:28 am #579437Awesomeness! Thanks guys! You can close this ticket.
February 9, 2016 at 5:12 am #580100 -
AuthorPosts
- The topic ‘Polylang logo changer’ is closed to new replies.