[Support request] All anchor link highlighted in main nav on one site

Home Forums Support [Support request] All anchor link highlighted in main nav on one site

Home Forums Support All anchor link highlighted in main nav on one site

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1585380
    Varga

    Hi dear support!

    I tried for hours to find out, but unfortunately I couldn’t find a solution.
    There are three sections on a page to which anchor links point from the main menu.
    All three menu items are highlighted.
    I know it’s because of the current-menu-item class in wordpress, but unfortunately I don’t know how to overwrite it.
    I want only the menu item that is currently active to be highlighted.
    anchor links highlighted
    I want to ask for help in this.
    Sorry if the text may be incorrect, but I don’t speak English well.

    Thank you for your help.

    #1585558
    David
    Staff
    Customer Support

    Hi there,

    can you share a link to your site?

    #1585568
    Varga

    I can’t link it, becouse i making on local machine.
    What are you interested in?

    demo1

    #1585719
    David
    Staff
    Customer Support

    Problem with on page links is that WP gives all of the them current-menu-item class. And as your urls have a relative path fixing them when the link comes from off page is more of a pain.

    This plugin is probably the best solution for that:

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

    #1586068
    Varga

    Thank you for your answer.

    #1586114
    David
    Staff
    Customer Support

    You’re welcome

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.