Archived topic
Menu and search not working correctly on mobile or tablet
7 replies · Started by Caro on September 5, 2021
Hi team,
the mobile/tablet menu and search aren't working properly on my site — https://www.thetwinklediaries.co.uk/ since I changed my caching plug-in to WP Rocket.
If I click the hamburger it doesn't open, but the category options appear underneath almost in the same way that you'd see them on desktop — not in a neat stack underneath the hamburger as they should do.
This is causing me such a headache! The plug-ins have really sped my site up — I have 99 on desktop and 99 mobile — so I don't want to get rid of the caching plug-in. But is there any script that I could exclude to ensure that the search function can still be used?
Hi there,
try excluding the main.min.js file from the plugins javascript optimizations.
Thanks David — there are three places I could add it.
1. Excluded JavaScript Files
Specify URLs of JavaScript files to be excluded from minification and concatenation (one per line).
2. Load JavaScript deferred
Load JavaScript deferred eliminates render-blocking JS on your site and can improve load time. More info
3. Delay JavaScript execution
Improves performance by delaying the loading of JavaScript files until user interaction (e.g. scroll, click). More info
Also — they've specified that it be added — /wp-content/themes/some-theme/(.*).js
Would I add
' /wp-content/themes/generatepress/(.main.min).js '
Best,
Caro
All three of them can cause an issue. Some break the menu and others make it so double tapping is required for the first opening
The root URL is ( as above you're correct ):
/wp-content/themes/generatepress/main.min.js
I've fixed it!!! With a lot of trial and error!
I have deleted Autoptimize and used the following settings in WP-Rocket.
https://www.screencast.com/t/TIu4GkrYEtg
Thought I'd share them, just in case anyone had the same issue as me in the future!!!
Awesome - glad to hear that - and thanks for sharing :)
No worries :) Really pleased to have been able to sort it — and retain the speed!!
:)