So I have created ID’s for different sections of the page and have added #anchor links in my menu, Everything works as it should but when loading the page all the menu items that point to anchors in the page are highlighted as being “active”. Once I start scrolling they immediately switch to the desired behavior, that is to say only the menu item that is visible in the page is highlighted and active. I’ve tried assigning the ID to different sections in cornerstone (block, row, element) but it always does the same thing.
just a follow-up.
The issue is caused by this:
I use /#anchor in my menu instead of #anchor
But if I don’t use the forward slash the links will not work when I am not on the homepage.
so from mysite.com/category1/ a custom menu link #anchor will point to mysite.com/category1/#anchor
it needs to go to mysite.com/#anchor.
That is why I included the root slash. This way the links work from everywhere but it messes with the CSS with the result that I describe in my first post.
Can this be fixed? Thank you.
I checked in my local development site. It seems that is working fine at my test site. In order to help you with your concern, I would request you to please share the credentials since the given credentials are allowing me to access the site but I am not able to access the site dashboard.
Please share your details in a secure note. Please provide the following details
- WordPress Login URL
- Admin level username and password
You can find the Secure Note button at the bottom of your posts
Thanks for your reply.
The given credentials have very limited access to your site. We cannot view the menus in Appearance > Menus or even the WP Dashboard. Kindly change the role as an Administrator.
In the meantime, please edit your menu and change your menu URL:
Thanks for getting back to me. I don’t understand why you had this experience. I just logged in with the credentials I sent you and have full admin access. I also checked again your role in users and it is indeed Administrator. Please check again. I am using a plugin to hide the standard wp-admin redirect but I have sent you the correct login link.
I have done as you asked and removed the forward slash from the anchor links in the menu and this fixes the “active link” issue as reported but now the other links no longer work. When clicking the anchor links from the Watch Meeting and Presentations pages, the anchor is placed after the current url which is then invalid. mysite.com/category1/#anchor. That is why I need the forward slash in there.
This is why you have to create two sets of menus. The first menu which contains
#section-ID in one of the menu item URLs will be EXCLUSIVELY used for the one-page navigation menu and the second menu which will have the
https://example.com/#section-ID will be assigned as your primary menu.
If only we have access to your dashboards, we should be able to check your current menus. By the way, please do check this documentation first:
Hi, I really have no idea why you have no access to the dashboard. I did read the one-page-navigation documentation but this problem is outside it’s scope.
Setting up 2 menus makes sense and would fix this but is there a way to make it all seem like one menu like it is now? For now, I just have my primary menu set up consisting half of anchor links and half of page links. This combined menu has to stay the same and visible up top at all times. If I understand correctly you suggest to make a menu with the anchors and a second menu with the 2 pages and the logout link. I would then have to find a way to place these menus next to each other in the same place.
Thanks for providing all your details!
I went ahead and confirm that on the first load before scrolling all 3 menus is highlighted because they are on the current page. My colleague suggested you to create two menus but you only wanted to have only one menu. To fix your issue, we need help from this plugin https://wordpress.org/plugins/if-menu/. I went ahead and install it to your website. Then in your Appearance Menu, I created two sets of menus ( Event Details, Presenter, Agenda ) in your Primary Menu.
On the first 3 sets of menu, I created an option to only show in the front page:
Here’s an option to only show on the homepage and no / at the beginning of the URL:
Then the next sets will show in the entire website, with / at the beginning of the URL:
Hope that helps solve your issue.
Wow that is great service! Thank you!
You’re welcome and it’s our pleasure to help you. If you have any other concerns regarding our theme features, feel free to reach us.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.