Support » Fixing WordPress » Dynamic menu highlighting with WordPress menus

  • blicht454



    I’m using a menu that I created on the backend under appearance > menus. The menu is functioning properly, but I’m just wondering how I can echo a “current” class for each page / menu item. Because I haven’t input the links myself, I don’t know how to access them.

    Any ideas?

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Peter Wooster


    The system adds the class current-menu-item to the li containing the menu item.




    I just did that. I put
    li.current-menu-item a {background: black; }
    in my themes css.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dynamic menu highlighting with WordPress menus’ is closed to new replies.