Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1181308

    I have implemented a custom logo to display on mobile version via theme functions filter (bottom below). For the most part this works fine and appropriate logo displays per device. However sometimes on desktop view the mobile version will display. Example this page viewed on desktop displays the full size custom logo when it should only display the desktop version:

    Not as often occuring, it will from time to time also display the dektoptop logo version on some mobile pages. The filter is plugged into the bottom of the functions file. Could the function simply be missed from be called sometimes and need to be implemented earlier in the functions php or what’s going on here? Thanks and as always so appreciative of the support provided and the amazing theme.

    `add_filter(‘avf_logo’,’av_change_logo’);
    function av_change_logo($logo) {
    if(wp_is_mobile()) {
    $logo = “https://gawebdev.com/georgia-web-development/wp-content/uploads/2020/01/Georgia-Web-Development-2020-Mobile-Logo.png”;
    } else {
    $logo = “https://gawebdev.com/georgia-web-development/wp-content/uploads/2020/01/georgia-web-development-logo-2020.png”;
    }

    return $logo;
    }

    • This topic was modified 4 years, 9 months ago by GaWebDev.
    #1181312

    Hey,

    Thanks for contacting us!

    I see mobile logo on all of your pages. Have you uploaded “web-development-logo-2020.png” logo in Enfold theme options? If you have, could you please create temporary admin logins and post them here so we can look at the backend? :)

    Best regards,
    Yigit

    #1181316

    Yes, desktop logo is uploaded. Access posted in Private Content.

    #1181386

    Hi,

    I deleted the code, updated the file, added it back then updated again and flushed cache and that seems to help.
    Please review your website :)

    Best regards,
    Yigit

    #1181393

    Yigit you are the man! Yes sir… all seems well now. If it’s a caching issue (which it may be it sounds like). Is there a CSS rule we need introduce to insure the caching continues to work? Or do you think it’s fixed? Thanks so much for your quick support and the fix!

    #1181395

    Hi,

    I think this is related to cache. I was looking if “wp_is_mobile” was deprecated but found another case where user pointed out cache as the issue – https://wordpress.org/support/topic/wp_is_mobile-function-is-ignored/

    In case you run into the same issue in future, please try flushing cache and check if that helps without updating the code :)

    Best regards,
    Yigit

    #1181406

    Thanks. Yes, in the past when the issue popped up I’d flush the cache and it would resolve the issue. I did this without updating code and it would clear the issue only to have it reappear eventually. Thanks so much for your support and help!

    #1181409

    Hi,

    You are welcome! :)

    For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/
    If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)

    Best regards,
    Yigit

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Custom Mobile Logo Glitch On A Few Pages’ is closed to new replies.