-
AuthorPosts
-
February 4, 2020 at 3:28 pm #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, 10 months ago by GaWebDev.
February 4, 2020 at 3:34 pm #1181312Hey,
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,
YigitFebruary 4, 2020 at 3:40 pm #1181316Yes, desktop logo is uploaded. Access posted in Private Content.
February 4, 2020 at 5:35 pm #1181386Hi,
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,
YigitFebruary 4, 2020 at 5:40 pm #1181393Yigit 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!
February 4, 2020 at 5:42 pm #1181395Hi,
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,
YigitFebruary 4, 2020 at 5:52 pm #1181406Thanks. 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!
February 4, 2020 at 5:53 pm #1181409Hi,
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 -
AuthorPosts
- The topic ‘Custom Mobile Logo Glitch On A Few Pages’ is closed to new replies.