Tagged: enfold update
-
AuthorPosts
-
June 15, 2022 at 11:00 am #1355307
Hello,
I have updated the theme to 5.0 and after that when i click on the mobile menu it creates a # in the URL and it scroll the site to the top of the page.
How can this be? I have tried with a website with the version 4.9.2.3 and it do not create the # in the URL.June 15, 2022 at 4:37 pm #1355354June 16, 2022 at 8:19 am #1355438Hi Rikard,
Yes of course, the link are in the private content.
On desktop i can’t click on the mobile menu after the update but on mobile when i click on the menu I get the issue as written above.June 16, 2022 at 11:20 am #1355468Hi,
Thank you for the update.
The menu item Forside is anchored to #top or to the body container but for some reason, the rest of the anchor gets removed, and only the hashtag remains. Have you tried to completely remove the #top anchor from the menu item URL?
Best regards,
IsmaelJune 16, 2022 at 1:23 pm #1355486Hi Ismael,
The menu item Forside is not the problem but i see it also create a #. It should send the visitor to the frontpage.
it is when you click on menu it scrolls to the top and it did not do that before.June 17, 2022 at 4:03 pm #1355618Hi,
Looks like the default mobile menu has been removed and you replaced it with a custom icon. Where did you add the script that toggles the mobile menu container or overlay?
Best regards,
IsmaelJune 20, 2022 at 8:39 am #1355810Hi,
In functions.php. We have had it like that in over 1,5 year. it is after the new update it is giving a issue.
The menu stil works but it just create # after the URL and scroll to the top of the page.June 21, 2022 at 3:32 am #1355920Hi,
We may need to access the site and check the script so that we can test it properly. Please provide the login details in the private field.
Best regards,
IsmaelJune 21, 2022 at 8:33 am #1355948Yes sure i have created a login for you.
June 22, 2022 at 3:46 am #1356075Hi,
We adjusted the code in the functions.php file a bit to prevent scrolling and remove the hashtag from the URL.
// burger menu trigger function ava_trigger_burger_menu(){ ?> <script> (function($){ $('.open-burger-menu').on('click', function(e) { $('.av-burger-menu-main a').click(); $('html, body').animate({ scrollTop: $(window).scrollTop()}, 100); setTimeout(function() { history.pushState("", document.title, window.location.pathname + window.location.search); }, 100); }); })(jQuery); </script> <?php } add_action('wp_footer', 'ava_trigger_burger_menu');
Best regards,
IsmaelJune 22, 2022 at 8:22 am #1356095Hi Ismael,
Thank you for your help. So if tis happens on a different site, i can use this code to fix the issue?
The function you changed use we on many sites, just so i know what to do when i update the rest of the sites we have.June 24, 2022 at 7:56 am #1356363Hi,
Yes, the script should work as long as the open-burger-menu element is present. On click, it will trigger the “.av-burger-menu-main a” element and open the burger menu, scroll to the current position, which should override the scroll issue, then remove the hashtag from the URL.
Thank you for your patience.
Best regards,
IsmaelJune 24, 2022 at 9:39 am #1356374Hi Ismael,
Alright thank you for your help.
Do you know why you had to make a new script?
Is it because after the update the class .av-burger-menu-main have been changed?June 27, 2022 at 8:19 am #1356582Hi,
I am not aware of any changes in that element, the mobile menu remains the same in the later versions of the theme as far as I know. However, we do know that the hashtag occurs because the href attribute of the link element inside the av-burger-menu-main contains a hashtag.
Best regards,
IsmaelJune 28, 2022 at 8:28 am #1356664H Ismael,
But if we do it on 100 sites and before the update it works fine, how can it be after the update it changes?
-
AuthorPosts
- You must be logged in to reply to this topic.