-
AuthorPosts
-
June 27, 2023 at 1:05 am #1411784
Hi guys!
On nav menu, when you click on weekly events, the section “ABOUT” becomes underlined.
When you click on “TICKETS” page doesn’t scroll to the beginning of “TICKETS”section.Both sections are part of the home page, and each one have their own ID
I will appreciate your help
ThanksJune 27, 2023 at 6:23 am #1411793Hey enfold,
Thank you for the inquiry.
To properly link the menu item to the anchor, you may need to replace the URL of the menu item from “https://www.site.com/#tickets” to simply “#tickets”. Let us know if this resolves the issue.
Best regards,
IsmaelJune 27, 2023 at 3:47 pm #1411848Thanks Ismael, but it didn’t work
June 28, 2023 at 6:04 am #1411915Hi,
Thank you for the update.
Have you tried purging the cache before testing the page again? If the issue persists, please share the site URL and login details in the private field. We may need to access the site in order to further investigate the issue.
Best regards,
IsmaelJuly 4, 2023 at 1:58 am #1412385It isn’t working
When I click on “Tickets” on nav menu, page are not positioning on the right place.
Credentials via private
Thanks!
July 6, 2023 at 1:23 am #1412573HI, could you help me with this?
Thanks!July 8, 2023 at 3:04 pm #1412727Hi,
The login doesn’t work, please check.
It looks like when your page loads some of the page elements load slower so the height of each section changes after the anchor section is in view, thus making the section show in the wrong place.
I believe that enabling the page preload at Enfold Theme Options ▸ Theme Options ▸ Page Preloading may help with this, but if you don’t want to use this option try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:function slowly_load_anchor_allow_page_elements_to_fully_load_first() { ?> <script> (function($) { $('a[href*=#]:not([href=#])').click(function() { var width = $(window).width() if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { if ($(window).width() < 768) { $('html,body').animate({ scrollTop: target.offset().top - 450 //offsets for fixed header }, 1500); return false; } else { $('html,body').animate({ scrollTop: target.offset().top - -150 //offsets for fixed header }, 1500); return false; } } } }); //Executed on page load with URL containing an anchor tag. if($(location.href.split("#")[1])) { var target = $('#'+location.href.split("#")[1]); if (target.length) { if ($(window).width() < 768) { $('html,body').animate({ scrollTop: target.offset().top - 450 //offset height of header here too. }, 1500); return false; } else { $('html,body').animate({ scrollTop: target.offset().top - -150 //offset height of header here too. }, 1500); return false; } } } }(jQuery)); </script> <?php } add_action('wp_footer', 'slowly_load_anchor_allow_page_elements_to_fully_load_first');
I tested this with desktop and mobile from your other pages to #tickets and from your other homepage anchors to #tickets and this worked in my tests.
I was not able to login and add the script and test, but I believe it will work, please give it a try.
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.Best regards,
MikeJuly 8, 2023 at 5:43 pm #1412742Hi Mike
Could you try to login and test? I am not use to edit functions.phpCredentials via private
Thanks!
July 8, 2023 at 5:54 pm #1412743Hi,
Thanks, I added the code for you and it seems to be working well, please clear your browser cache and check.Best regards,
MikeJuly 8, 2023 at 6:04 pm #1412744Hi MIke, thanks!
Unfortunately this code is not positioning Ticket section on the right place.
Besides, code also affected other anchors ID’s, positioning them on the wrong place.Please take a look at the sample link showing the right place for each menu content.
Regards
SantiagoJuly 8, 2023 at 7:35 pm #1412753Hi,
When I test they all show in the correct place, please see the screenshots in the Private Content area.
Perhaps it is just your specific screen size, try using this tool and tell us your screen resolution so I can test and possibly adjust.Best regards,
MikeJuly 8, 2023 at 7:51 pm #1412755My screen resolution is: 1728×1117
Other thing, when you click on nav menu on mobile devices
it doesn’t work.July 8, 2023 at 8:29 pm #1412766Hi,
Thanks for your screen size, I made an adjustment and it seems to be working good now.
On my Android device the mobile menu works and the links work also.
Please clear your browser cache and check.Best regards,
MikeJuly 8, 2023 at 9:31 pm #1412775Thanks Mike
Everything works on desktop version.I’ve just clear the cache on mobile and nav menu links didn’t work
I have an Iphone with iOs
Regards
July 8, 2023 at 9:37 pm #1412776Hi,
Glad to hear the desktop is working, for mobile you mean the burger menu is not opening, correct?
I don’t have an iPhome but it’s working for Android
Please note that testing with 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,
MikeJuly 10, 2023 at 10:39 pm #1412999`Correcto, burger menu isn’t working. And cache is fully purged.
Just works when clicking on WEEKLY EVENTS.
When you click on TICKETS and ABOUT, page always positioning on WEEKLY EVENTS sectionRegards
July 11, 2023 at 12:28 pm #1413039Hi,
Do you mean that the mobile you mean the burger menu is not opening, or that it opens but it lands in correctly?
For me the burger menu is opening and it’s landing correctly on a screen width of 425px, what is your screen width for mobile?Best regards,
MikeJuly 11, 2023 at 6:11 pm #1413075I meant that when you click on burger menu nav options, and then select TICKETS or ABOUT,
browser always take you toWEEKLY EVENTS sectionRegards
SantiagoJuly 11, 2023 at 8:01 pm #1413078Hi,
Thanks, I tested your three home page IDs at 320px, 375px & 425px in Windows in Chrome, Firefox, & Edge Dev Tools and my Android device, and each time the correct section is shown, so I don’t know why you are experiencing this.
If you are using a iPhone it 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,
MikeJuly 12, 2023 at 5:07 pm #1413157Thanks Mike. Finally I could purge the cache, that was the problem.
Thanks for your help and have a great day!July 12, 2023 at 5:16 pm #1413158Hi,
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 ‘Menu ID’s for the same page are not working well’ is closed to new replies.