Tagged: current-menu-item, onepager
-
AuthorPosts
-
October 9, 2015 at 10:08 am #516281
Hi, I have created a child theme with a one pager menu. Navigation works fine. The color sections have their own IDs and the menu items are linking to the ids. When I click on a menu item it jumps to the section .. so far so good. But the active menu item does not always show up as active menu item even though the page jumps to the correct id that is referenced in the menu. I have to adjust position with the mouse until the item gets the current-menu-item class. Any idea what the reason could be?
You can see it at the demo site:
http://hense.design-meets-code.de/
There is a maintenance plugin active. Access is user: demo / pw: demo- This topic was modified 9 years, 1 month ago by bluecafe.
October 9, 2015 at 10:47 pm #516694Hello,
I have the exactly same trouble.
Thanks.
October 10, 2015 at 9:14 am #516745Hi @GustavoRoca, could it be that you have a slider element of the avia builder on your page? I found a similar thread where the problem was related to a slider https://kriesi.at/support/topic/dynamic-anchor-issue-with-active-menu-indicator-and-scroll-on-pageload/
I tried to remove the full width slider and the problem was gone. So there seems to be a problem with active menu indicator and slider scripts (even the slider that comes with enfold and the avia builder). Can you confirm that this is a slider related problem?
Any solution on this is appreciated because I need the slider on my onepager.
- This reply was modified 9 years, 1 month ago by bluecafe.
October 10, 2015 at 6:30 pm #516856Hi @bluecafe, is not a full slider problem for me apparently, I remove the slider like you suggest and I still have the same behavior in the nav menu.
Sometime in the past I can fix this behavior, now I will try again.
If you check in firefox, you can see the menu work well.
Regards.
October 10, 2015 at 8:00 pm #516867Yep, I fixed it, but is not a permanent solution.
First, active the advance layout builder debug.
http://kriesi.at/documentation/enfold/enable-advanced-layout-builder-debug/
Copy all your code and make a backup of them.
Clean all your Avia Layout Builder to initial state, and press update WP.
Check the change.
Paste your code again, press update again.Note: Maybe this work well with Avia templates, but this function sometime deleted the code inside of code block.
Hope this helps.
Bye.
October 10, 2015 at 8:48 pm #516869Excuse me, the wrong behavior in the menu come back.
Apparently I have a loop with my WPML language setting.
October 11, 2015 at 11:38 am #516920Thanks for your reply @GustavoRoca, I will try your suggested solution. What do you mean with “clean the avia layout builder”? Creating a new page? I didn’t change anything in the layout builder I just used it. Apparently my problem is connected with the full width slider element of the layout builder.
Here is the demo using the full width slider:
http://hense.design-meets-code.de
(user: demo / PW demo)
The navigation shows current menu item status randomlyThen I replaced the slider with a parallax image and the problem is gone
http://noslider.design-meets-code.de
(user: demo / PW demo)The only difference between both sites is that the first site is using the avia full width slider element that comes with the enfold theme. The menu items are flickering and show current menu status randomly (maybe WPML is using a similar script like a slider for language switching?).
The second site is exactly the same but uses a parallax image instead of the avia full-width slider and the menu works smoothly and flawlessly.Although this solves the problem somehow it means that I can’t use the full width slider in a onepager.
This is not a very satisfactory solution. I would appreciate if the support could confirm that they got notice of the problem.P.S.: After doing some more testing the error can be narrowed down to a home link that is referenced as #top. If I reference home as #top (even if no slider is involved) menu items show up wrong. Probably due to the scroll up button? So the slider doesn’t seem to be the problem but a homelink that links to the id “top”.
- This reply was modified 9 years, 1 month ago by bluecafe.
October 12, 2015 at 3:54 pm #517443Hey @bluecafe,
Please try changing your #top anchor to for instance #full_slider_1 instead. The #top div is wrapping the whole page causing it to be “active” all the time. We like that users try to help each other but please have in mind that each time you reply to a thread it will be sent to the back our support queue.
Thanks,
RikardOctober 12, 2015 at 7:25 pm #517624Thanks for your reply @Rikard. The reason I used #top was that #full_slider_1 doesn’t look very inviting as URL and there is no option to give a slider an own ID like it’s possible with a color section. And you can’t put a full-width slider within a color section. Maybe the automated slider ID could be removed in favor of the option to choose an own ID? full_slider_1 just isn’t a desirable permalink option.
October 13, 2015 at 8:58 am #517882 -
AuthorPosts
- You must be logged in to reply to this topic.