-
AuthorPosts
-
May 30, 2018 at 1:31 pm #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,
TimJune 1, 2018 at 3:37 pm #965419Hey 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,
NikkoJune 1, 2018 at 5:04 pm #965454Dear 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,
TimJune 1, 2018 at 8:23 pm #965550Nikko,
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,
TimJune 1, 2018 at 9:02 pm #965562Nikko,
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.
TimJune 1, 2018 at 9:19 pm #965566Nikko,
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,
TimJune 1, 2018 at 9:36 pm #965571Nikko,
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, 7 months ago by hypergolica.
June 3, 2018 at 11:11 am #966096Dear 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,
TimJune 4, 2018 at 11:03 am #966437Hi 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,
NikkoJune 4, 2018 at 11:06 am #966440Dear Nikko,
No worries. Thank you for taking a closer look.
What did you do to fix the logo issue?
Please advise.
Thank you.
TimJune 4, 2018 at 3:48 pm #966563Hi Tim,
You’re welcome, just glad we could help.
I just flushed out the cache and that worked properly. :)Best regards,
NikkoJune 4, 2018 at 4:19 pm #966599Dear 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
June 4, 2018 at 4:36 pm #966614Hi 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,
NikkoJune 4, 2018 at 4:43 pm #966619Dear Nikko,
Got it, many thanks. Consider this case closed.
Thank you again!
Cheers,
TimJune 4, 2018 at 6:38 pm #966710Hi 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 -
AuthorPosts
- The topic ‘Change Logo on Mobile + Optimize Color Box Image and Gallery Images for Mobile’ is closed to new replies.