Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #964214

    Dear Support,
    Three things:
    1. I had added a filter to my child theme’s function file some time ago to change the logo on mobile, but that no longer works. What now is the best way to do this?
    2. The background image of the color box on the home page is too big on mobile. How do I shrink it. (Link below.)
    3. What is the best module to use to guarantee a good size presentation of images on mobile? The current gallery module I have shows small images and requires two clicks to view. (Link below.)
    Please advise.
    Thank you,
    Tim

    #965419

    Hey hypergolica,

    1. Are you referring to this filter:

     add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo)
    {
        //some code here
        return $logo;
    }

    this filter should still work in the latest version.

    2. Try adding this css code in QUick CSS (located in Enfold > General Styling), just adjust the height:

    @media only screen and (max-width::767px) {
      #top.home #av_section_1 {
        background-size: cover !important;
        background-attachment: scroll !important;
      }
    
      #top.home #av_section_1 .container {
        height: 200px;
      }
    }

    3. Try adding this css code in QUick CSS (located in Enfold > General Styling):

    @media only screen and (max-width::767px) {
      #top #wrap_all .avia-gallery .avia-gallery-thumb a {
        width: 100% !important;
      }
    }

    Hope this helps.

    Best regards,
    Nikko

    #965454

    Dear Nikko,
    Many thanks for the reply.
    Here is the filter code:

    add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo)
    {
    if(wp_is_mobile() )
    {
    $logo = "...address of new logo ";
    }
    return $logo;
    }

    I can confirm that the filter does NOT work. (Link to image as seen on mobile + link the image that should have been visible.)
    Might it not work because of a caching plugin? I’ve got WP Rocket installed and activated.
    Credentials below if you want to look.

    I’ll test out the CSS you suggest and report back.
    Thank you, Nikko!
    Cheers,
    Tim

    #965550

    Nikko,
    Okay, I’ve noticed that if I clear the cache then refresh, the mobile logo will work for a couple of “refreshes”… but as I continue to test other CSS changes, the ‘mobile logo’ is replaced by the original logo.
    No idea why this happens.
    What do you see at your end?
    Thanks,
    Tim

    #965562

    Nikko,
    I’m also not having any luck with the code you’ve given me for home page image.
    I’ve done the following:

    /* Shrink the color box on the home page on mobile horizontal */
    @media only screen and (max-width::320px) {
      #top.home #av_section_1 {
        background-size: cover !important;
        background-attachment: scroll !important;
        height: 200px !important;
        border: 2px solid red !important;
      }
    
      #top.home #av_section_1 .container {
        height: 200px;
      }
    }

    As you can see, I’ve tried targeting a smaller device (max width 320 px) and I’ve tried adding a border to check and see if the code is actually communicating with the DIV… which it isn’t.
    This is one of the things I struggle the most with: very hard to target specific elements in the Enfold theme with CSS. I wish it were easier.
    That said, I’m probably not doing something right. What’s the trick?
    Please advise.
    Thank you.
    Tim

    #965566

    Nikko,
    What is the best CSS trick to use just to make sure that it is actually talking/connecting to the element? I’m not having any luck with your CSS above.
    Also, I’m guessing the double colon “::” after max-width is a typo, right?
    Please advise.
    Thank you,
    Tim

    #965571

    Nikko,
    Apologies for the many replies…
    I’ve found a way to control the color box on the mobile. Here is the code:

    /* Shrink the color box on the home page on mobile portrait */
    @media only screen and (max-width:320px) {
      #top.home #av_section_1 {
        /*background-size: cover !important;*/
        background-size: 100% auto !important;
        background-attachment: scroll !important;
        height: 200px !important;
      }
      #top.home #av_section_1 .container {
        height: 200px !important;
      }  
    }

    Strangely, the mobile logo is back… don’t know why.

    Not luck increasing the sizes of the gallery images with the CSS that you gave me. Other ideas?
    Thank you.
    Tim

    • This reply was modified 6 years, 5 months ago by hypergolica.
    #966096

    Dear Support,
    Please ignore all requests in this post regarding CSS. I’ve realized it is easier for me to come to you, rather than to get you to come to me, so I’ve made some changes in accordance with clues that I’ve gotten from your demos.
    That said, the change of logo on mobile is still a problem. I’ve figured out that it will appear properly if you navigate to the interior pages, but, when returning to the home page, it switches back to the desktop logo.
    Any idea why?
    Please advise.
    Thanks,
    Tim

    #966437

    Hi Tim,

    I apologize for the late response and glad that you have fixed the css issues.
    As for the logo on mobile it should be fixed now, I have tested it and it’s a caching issue.
    I noticed on mobile the problem only appears when you’re not logged in.
    Let us know if you need further assistance.

    Best regards,
    Nikko

    #966440

    Dear Nikko,
    No worries. Thank you for taking a closer look.
    What did you do to fix the logo issue?
    Please advise.
    Thank you.
    Tim

    #966563

    Hi Tim,

    You’re welcome, just glad we could help.
    I just flushed out the cache and that worked properly. :)

    Best regards,
    Nikko

    #966599

    Dear Nikko,
    Yes, I did that too, but it is only a temporary fix.

    Try this:
    1. Flush the cash, refresh the home page. Everything should be okay… but;
    2. Navigate to an interior page, then go back to the home page;
    3. You’ll see that the mobile logo is no longer there and instead shows the desktop logo.

    Any idea what a permanent fix might be?

    Thanks,

    Tim

    #966614

    Hi Tim,

    I just checked again and it seems to use the desktop logo on mobile but when I cleared the cache in WP Rocket settings it shows the logo properly again.
    For now I have checked Separate cache files for mobile devices which is found in Settings > WP Rocket > Cache > Mobile Cache.
    Try to observe for sometime, if the issue returns, please uncheck Enable caching for mobile devices and Separate cache files for mobile devices.
    If the issue still persists, I would suggest temporarily disabling the caching plugin since it’s causing the issue.

    Best regards,
    Nikko

    #966619

    Dear Nikko,
    Got it, many thanks. Consider this case closed.
    Thank you again!
    Cheers,
    Tim

    #966710

    Hi Tim,

    Glad that we could help. :)
    Feel free to comeback if you need further assistance.
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Change Logo on Mobile + Optimize Color Box Image and Gallery Images for Mobile’ is closed to new replies.