Archived topic
mobile menu issue
24 replies · Started by el-mob on September 8, 2020
Hi I'm having trouble with my mobile menu
on some pages, it shows the toggle and search icon in different locations
thanks
Hi there,
can you direct me to a page where the Icon and Menu toggle are incorrect ?
it's basically all over the site sometimes it loads correctly and sometimes not try to navigate on a mobile device
thanks, elad
I just checked both pages you've linked using Chrome mobile simulator and my phone but not seeing the issue.
You've mentioned that it sometimes happen so I would think that it's related to your caching plugin.
Can you disable that and do some testing?
Hi I did disable the catch plugin and all other plugins still same issue
ley me send you a screen shout so u can see what I'm talking about
just leet mee know how to sent to u
thanks
To send us a screenshot use a service like imgur or other image sharing site. Or simply upload the screenshot to your Media Library or Cloud drive and provide us a link.


image
OK - that issue is because your Logo is being Lazy Loaded. Which plugin are you using for that ? The plugin should have an option to disable lazy load on specific images. You need to disable it on the Logo,
im using wp rocket
Hi elad,
You can try following WP Rocket's guide on disabling lazy load on your logo.
https://docs.wp-rocket.me/article/15-disabling-lazy-load-on-specific-images
Let us know if you were able to make it work. Cheers.
i tried function rocket_lazyload_exclude_src( $src ) {
$src[] = 'https://staging1.xxxxxxxxxxxx.com/wp-content/uploads/2020/09/xxxxxx.svg';
return $src;
}
add_filter( 'rocket_lazyload_excluded_src', 'rocket_lazyload_exclude_src' ); but dosnt work for me
Perhaps targeting the logo by class attribute is more suited.
You can try this code.
function rocket_lazyload_exclude_class( $attributes ) {
$attributes[] = 'class="header-image lazyloaded"';
return $attributes;
}
add_filter( 'rocket_lazyload_excluded_attributes', 'rocket_lazyload_exclude_class' );
After applying, clear browser cache and reload the page.
this break thee site
https://postimg.cc/bZ4HYyjc
Strange, the code provided doesn't cause any errors on my end.
Anyway, I've checked your site again and it seems to be working fine now. As shown here:
https://share.getcloudapp.com/rRu7K2Zb
Seems like you've disabled WP Rocket's Lazy Load - Optimize Images plugin already as it doesn't show in the DOM anymore.
I believe its better that way as the site doesn't have to load more plugins. Plus it saves you the hassle of trying to solve the lazy loading issue caused by it.
Let us know if there are any other issues. Feel free to open up a new topic if a new issue shows up. :)