Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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!!!!

    #469972

    Hey 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,
    Basilis

    #470331

    Hello 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….

    #470631

    Hey!

    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,
    Rikard

    #470937

    No we are using PolyLang.

    #471055

    Hey!

    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,
    Yigit

    #471063

    When I do that my theme becomes completely blank. Pages don’t load :(
    Sorry about all of that!

    #471074

    Hey!

    Please go to wp-content/themes/enfold/functions.php file and remove the code i posted via FTP and then create a temporary admin login and post it here privately so we can add the code for you. To be on the safe side, you can post FTP access as well :)

    Best regards,
    Yigit

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.