Tagged: disappearing, Hamburger-Menu, mobile
-
AuthorPosts
-
June 27, 2023 at 10:03 am #1411801
Hi
I am having an issue with the hamburger menu not appearing on PageLoad on mobile devices.
One tap on the screen and it reappears – it doe not apepar on initial pageload. Any ideas what’s wrong? I am tearing my hair out (and I don’t have much anyway!).
Site: https://swarezart.com/ – only affects mobile devices
Many thanks
EdJune 27, 2023 at 11:02 am #1411815Hi Ed,
Please try the following in Quick CSS under Enfold->General Styling:
.main_menu { z-index: 99999 !important; }
Best regards,
RikardJune 27, 2023 at 11:45 am #1411819Hi Rikard
Thank you for your help. I have tried that but it’s not working. Mobile behaviour is still the same. All caches flushed, CDN purged, Cloudflare purged, browsers emptied etc…You have to touch the screen or pull down to refresh before the hamburger menu icon appears….
Anything else perhaps?
Thanks
EdJune 27, 2023 at 11:47 am #1411821What’s curious is, if you go here on your mobile:https://swarezart.com/limited-edition-prints/
The tap the screen the images shrink a little… so is it an animation conflict somewehre?
Every page is affected. A single touch brings it back – very odd?- This reply was modified 1 year, 5 months ago by Swarez.
June 28, 2023 at 6:32 am #1411922Hi,
Thank you for the update.
Have you made any modifications to the template files such as “header.php” or “helper-main-menu.php”? It is also possible that the issue is caused by a plugin or one of its options, such as script compression.
To temporarily resolve the issue, please try adding the following code to the functions.php file.
add_action('wp_footer', 'ava_auto_resize'); function ava_auto_resize(){ ?> <script> (function($){ var int = window.setInterval(function(){ $(window).trigger('resize'); }, 1500); $(window).on("load", function () { setTimeout(function() { clearInterval(int); }, 500); $("body").trigger("click"); }); })(jQuery); </script> <?php }
Best regards,
IsmaelJune 28, 2023 at 8:55 am #1411931Hi Ismael
Thank you for the updates. I have tried what you suggested but sadly it hasn’t resolved the issue.
I have removed Wp Rocket and the issue remains – so can’t be a caching or minification problem. I can also eliminate the CDN delivering wrong file versions as this was triggered inside Wp Rocket.I have deleted old CSS and JS files from Enfold Performance tab too.
I have not made any changes to “header.php” or “helper-main-menu.php’.Interestingly though, if it helps, I only now have this problem since switching to a menu underneath the logo (centered). Previosuly I had a left logo with a smaller, right handed menu. Could this swap be causing an issue?
Would appreciate your help again please… this is bewildering to me.
Everything else was fine (with WpRocket running alongside all the other plugins) – this error only occured when i switched header menu layouts.I will leave off WPRocket today if that makes life a bit easier. Will post logins in the private area in case someone needs them.
Many thanks
Ed- This reply was modified 1 year, 5 months ago by Swarez.
July 2, 2023 at 2:56 pm #1412252Hi,
Thank you for your patience, I checked your mobile menu on my Android device and it showed for me and opened when I clicked it, I assume the Ismael’s script above is enabled but I couldn’t get past the QR code when I logged in to your site.
I’m not sure what would cause the error you were seeing before Ismael’s script as I have not seen any issues like this before.
Do you have a current staging site that we could investigate with?Best regards,
MikeJuly 2, 2023 at 9:30 pm #1412290Hi Mike
Thanks for coming back to me.
I have re-activated WP Rocket and removed the Authenticator QR code for logging in to the site.
Historically, having WP Rocket enabled never caused the issue with the hamburger menu – it was only when I changed the layout that I encountered this issue. I was still having it when I used Ismael’s code.
Now that WP Rocket is back on the problem has returned.
Nothing else I can see has changed from when it WAS working correctly – only the Enfold header layout change I mentioned above.
Thanks for looking into this for me.
All the best
EdJuly 2, 2023 at 11:02 pm #1412295Hi,
Thanks for the login, I tested changing the header as you had before, logo left, menu right and the issue was not there anymore and then changing it back to logo center menu below caused the issue again.
I tried testing on my site but couldn’t reproduce the issue, and I don’t see any reason why this header change would cause the issue.
I have asked the rest of the team for advice, thank you for your patience.Best regards,
MikeJuly 3, 2023 at 9:32 pm #1412369Okay Mike, thank you for looking in to this.
I shall hope to hear back from you very soon when the Dev team come back with a solution
Kind regards
EdJuly 23, 2023 at 5:04 pm #1414141Hi,
Thank you for your patience, unfortunately I have not received any advice from the team so I did some more digging and I found that when the logo center menu below header option is used a header_main_alternate is created along with a second burger menu on page load:
I also noticed that if you wait long enough without interacting with your site on mobile the burger menu will show, so I thought that the issue was the delay of your javascript by your WP Rocket plugin, so I used the One-click exclusion option to exclude the theme javascript:
and cleared your cache and my browser cache and now the burger menu shows for me on my Android device and in my browser Dev Tools emulating a mobile device.
Please give this a try and please note that testing with iPads & iPhones can be hard to clear the cache, often you need to also clear the history to fully purge the cache, following these steps for Safari and note Step 4 where you will Clear the History.Best regards,
MikeAugust 31, 2023 at 9:59 am #1417662Hi Mike
Thank you (as always) for taking the time an dtrouble to help me. I apologise for the lateness of my reply.
Thank you – that all seems to be working now. I appreciate your help once again!
Have a great day
All the best
EdAugust 31, 2023 at 10:07 am #1417663Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Hamburger menu not appearing unless tapped’ is closed to new replies.