-
AuthorPosts
-
July 7, 2015 at 8:10 pm #469916
Hello
We have created a website with the Enfold theme, and we have French and English pages and we need to change the logo in the header according to the language. We had this code put in, but the problem is, the logo doesn’t shrink to the right size in the mobile device..page-id-1672 .logo img { opacity: 0; }
.page-id-1672 .logo { background-image: url(/wp-content/uploads/logo-solarium-servitech-en.gif); }
.header_color .ajax_search_excerpt { display: none; }Here is the url to the English home page. If you open it in iPhone or even Blackberry you will see what I mean.
Thanks!!!!
July 7, 2015 at 10:46 pm #469972Hey safranpub!
You will also need to add the media queries for mobile to load the appropriate logo:
/* Mobile Styles ================================================== */ /* Note: Add new css to the media query below that you want to only effect the Mobile and Tablet Portrait view */ @media only screen and (max-width: 767px) { /* Add your Mobile Styles here */ }
and add your style!
Best regards,
BasilisJuly 8, 2015 at 3:42 pm #470331Hello Basilis
The logo looks actually really good in French, but the english, one which is overlaping, doesnt shrink to the tablet size.
Not sure what to add there since the theme doesnt support adding different logos in different languages. So all I want is to change the overlaping logo to be smaller in mobile. All my pages have this… So do I have to add a style for all the pages? Or can it be done once? I have 24 pages….July 9, 2015 at 6:53 am #470631Hey!
Are you using WPML for translation? If so, you should be able to set different logos for the different languages in the Enfold options in the backend.
Regards,
RikardJuly 9, 2015 at 3:22 pm #470937No we are using PolyLang.
July 9, 2015 at 5:57 pm #471055Hey!
Please add following code to Functions.php file in Appearance > Editor
add_filter('avf_logo','av_change_logo'); function av_change_logo($logo) { $currentlang = get_bloginfo('language'); if($currentlang=="en-US") { $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png"; } if($currentlang=="fr-FR"){ { $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png"; } return $logo; }
Best regards,
YigitJuly 9, 2015 at 6:19 pm #471063When I do that my theme becomes completely blank. Pages don’t load :(
Sorry about all of that!July 9, 2015 at 6:49 pm #471074 -
AuthorPosts
- You must be logged in to reply to this topic.