-
AuthorPosts
-
October 30, 2023 at 1:47 pm #1424124
Hi there,
I used the following code on my site:
/*Use a different logo on mobile*/ add_filter('avf_logo','av_change_logo'); function av_change_logo($logo) { if ( wp_is_mobile() ) { $logo = "media link"; } return $logo; }
Unfortunately it does not work entirely. On mobile, it works everywhere but on homepage, on desktop the mobile header appears ridiculously big on the pages “Print & Web” and “Shop”.
The problem does not disappear anymore if I delete the code in functions.phpAs a work around I entered the link of the original logo into the code.
Can you please have a look? Login data below…Thanks a lot
DanielaOctober 31, 2023 at 2:40 am #1424197Hey Wollenhaupt,
Thank you for the inquiry.
The selected logo (Logo-Wollenhaup_RGB-Schutzraum-300×266) correctly displays on desktop view and switches to Logo-Wollenhaup_RGB-Schutzraum when we reload the page in a mobile emulation. Please note that the logo will not switch back and forth between the mobile and desktop versions when you resize the browser. You’ll need to reload the page and check it on an actual mobile device.
Best regards,
IsmaelOctober 31, 2023 at 12:58 pm #1424242Hi Ismael,
thank you!
The problem is only visible after logging out of the dashboard. As long as I am logged in, everything is fine.
I checked the page on my mobile and the logo is displayed differently on “Print & Web” and “Shop”. Same applies to desktop. The logo is really huge on these pages.The link for the intended mobile logo is given in private content. It is not supposed to be the one with “Schutzraum”.
I saw that the code in functions was inactive. I activated it with the correct image link and guess what: upon checking on my mobile device on some pages the Enfold logo was displayed, on others the original logo set in theme options was shown.
I have no explanation, as this code works just fine on another customers website I also created with Enfold.If you have any idea about what to do please let me know.
Regards
Daniela- This reply was modified 1 year ago by Daniela.
November 1, 2023 at 3:50 am #1424282Hi,
Thank you for the update.
We adjusted the filter in the functions.php file a bit. The “Logo Wollenhaup_RGB” image (ID: 31010) is now displayed correctly on mobile view. Please make sure to delete the cache and perform a hard refresh before checking the page.
Best regards,
IsmaelNovember 7, 2023 at 10:10 am #1424898Hi Ismael,
this is what I see after hard refresh and without login:
On mobile it does not work on every page either. I deleted the filter but the problem seen in screenshot does not disappear.
November 7, 2023 at 10:12 am #1424899I now deleted the image as well and homepage is fine again.
November 9, 2023 at 12:38 am #1425043Hi,
We are not able to reproduce the same issue the last time we checked the page. Are you sure that you removed the cache and performed a hard refresh before checking the pages?
Best regards,
IsmaelNovember 9, 2023 at 2:48 pm #1425129Yes, I am sure.
I even tried on different devices with cleared cache.
November 12, 2023 at 1:49 pm #1425331Hi,
Thank you for the link to your site, but unfortunately I’m not able to reproduce your screenshot error on my Android device, try using this link to identify your screen resolution for your device so we can reproduce the error. Perhaps the error is for a specific size and device?Best regards,
MikeJune 21, 2024 at 9:50 am #1453613Topic can be closed.
June 21, 2024 at 12:08 pm #1453725Hi,
Thanks for the update. Please open a new thread if you should have any further questions or problems.
Best regards,
Rikard -
AuthorPosts
- The topic ‘Different Logo on Mobile’ is closed to new replies.