• bobfelstead

    (@bobfelstead)


    Hi There,

    I’m using this plugin for the first time, and although it’s working for the scroll to #id, it highlights 2 menu items.

    I’ve tried to amend the code in css
    .main-navigation .current-menu-item a.mPS2id-highlight {background: rgb(0,126,148) !important;}/*higlight*/
    to
    .main-navigation .current-menu-item a.mPS2id-highlight-first {background: rgb(0,126,148) !important;}/*higlight*/
    to highlight a single item, but it doen’t work. Ive also tried the highlight first in the backend. there’s no effect and the menu doesn’t highlight.

    I’ve dequeued most js resources, but still have the same issue. the temporary website is at http://www.waw.addins4webplus.co.uk.

    I’m using firebug to debug the site and check for conflicts, but can’t find any. Is there something that I’m missing?

    regards,

    Bob

    https://wordpress.org/plugins/page-scroll-to-id/

Viewing 1 replies (of 1 total)
  • Plugin Author malihu

    (@malihu)

    Hello,

    The issue you’re having is because you have multiple menus with same links (sticky nav menu, mobile, footer etc.). When you enable the single highlight option in the backend or when using .mPS2id-highlight-first you cannot see it because your sticky nav menu links are neither first or last (I think the first link is in your mobile menu and the last one in your footer menu). Hope this makes sense!

    You normally should set which menu links to highlight via the “Highlight selector(s)” option (otherwise the script highlights all of them).
    Try setting the following value in “Highlight selector(s)” field in plugin settings:

    .sticky-nav .menu-item > a

    The above is your main sticky menu links selector, so the plugin script will restrict highlighting only on your sticky menu links.

Viewing 1 replies (of 1 total)
  • The topic ‘Menu highlight first item only’ is closed to new replies.