-
AuthorPosts
-
December 15, 2022 at 2:17 pm #1376270
Hallo, firstable i need to say that i tried the solutions showed up here: https://kriesi.at/support/topic/different-logo-in-the-header-for-mobile-version/
All 3 Solutions don’t work on our site, thats why i need to open up a new thread.– i use a chiltheme and edit funktions.php in it.
– i have a vertical logo on desktop (380px X 380px)
http://ba0ez4b.myraidbox.de/wp-content/uploads/2021/08/deepvelop-hamburg-logo-mit-text-380×510-2.pngand it’s supposed to be horizontal on mobile (mobile-logo is 300×80 px)
http://ba0ez4b.myraidbox.de/wp-content/uploads/2022/12/deepvelop-logo-mobile-quer.png-
These three solutions taken from the thread sadly don’t work
1.) this one is not working:
add_filter(‘avf_logo’,’av_change_logo’);
function av_change_logo($logo) {
if(wp_is_mobile( ) )
{
$logo = “http://ba0ez4b.myraidbox.de/wp-content/uploads/2022/12/deepvelop-logo-mobile-quer.png”;
}
return $logo;
}—-
2.) this one is not working:add_filter(‘avf_logo’,’av_change_logo’);
function av_change_logo($logo) {
if(wp_is_mobile()) {
$logo = “http://ba0ez4b.myraidbox.de/wp-content/uploads/2022/12/deepvelop-logo-mobile-quer.png”;
} else {
$logo = “http://ba0ez4b.myraidbox.de/wp-content/uploads/2021/08/deepvelop-hamburg-logo-mit-text-380×510-2.png”;
}return $logo;
}—-
3.) this one is not working:add_filter(‘avf_logo’,’av_change_logo’);
function av_change_logo($logo) {
if(wp_is_mobile()) {
$logo = “http://ba0ez4b.myraidbox.de/wp-content/uploads/2022/12/deepvelop-logo-mobile-quer.png”;
} else {
$logo = “http://ba0ez4b.myraidbox.de/wp-content/uploads/2021/08/deepvelop-hamburg-logo-mit-text-380×510-2.png”;
}return $logo;
}—
The last Solution is actually in Child-Theme in functions.php
Thank you very much for your help. (this is our final issue in a 16 month project development time).
December 16, 2022 at 6:16 am #1376344Hi beachmarc,
Thanks for giving us admin access.
The code works, the only missing thing why it didn’t work was because the child theme wasn’t activated.
I have activated the child theme and imported the parent theme settings.
Please review your site :)Best regards,
NikkoDecember 16, 2022 at 12:30 pm #1376391Hallo Nikko,
thank you very much for your support. i will leave a review.
can you plase tell me, which of the mentioned solutions was the working one and where you added it?
after deletimg the cache it was working but it stopped working after half an hour..thank you
December 16, 2022 at 6:13 pm #1376432Hi beachmarc,
I didn’t touch anything in the functions.php file, I basically just activated the child theme, so the one you have there already is a working one.
If I compare all those codes, all should work, they are basically using the same filter.Best regards,
NikkoJanuary 25, 2023 at 5:29 pm #1395208Hallo Nikko,
thank you for your support.we launched the site: https://deepvelop.de/
There is one final issue:
When on mobile correct logo is dissplayed on all subpages, like https://deepvelop.de/ausbildung-zum-sportmentaltrainer/ for example.-> exept home: https://deepvelop.de/
when clicking the logo for going to “home” it displays the wrong log (the desktop logo).
for the “home” it always displays the desktop logo.How is this possible?
Thank you so much for your support.
bebst regards
beachmarc
January 26, 2023 at 12:41 pm #1395368Hi beachmarc,
I tested the code you have in your functions.php file on my test site and it worked as expected.
I noticed that you are currently using an older version of Enfold. Could you please update Enfold to the latest version 5.4 and check once again?
Best regards,
YigitJanuary 26, 2023 at 4:16 pm #1395399Hallo Yigit,
i updated the template to 5.4 its kind of weird.. first it worked on some pages and then it doesn’t.
Coukd you please check it once again?
Thank you
regards
Marc
January 26, 2023 at 4:28 pm #1395401Hallo Yigit, it was finally a caching issue, displaying the changes i could solve.
Thank you so much.
regards & thank you
beachmarc
January 26, 2023 at 5:52 pm #1395413Hi Marc,
Great! Thanks for the update :)
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 :)
Enjoy the rest of your day!
Best regards,
Yigit -
AuthorPosts
- The topic ‘Different Logo for mobile and Desktop in Enfold’ is closed to new replies.