WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Highlight Current LINK in WordPress 3.0 Menus (2 posts)

  1. flutch
    Member
    Posted 2 years ago #

    hi,

    i have a custom menu working great until now.
    i had to add small images into 2 tabs of this menu (a different image for each), and for this i replaced 'page' menu elements with 'link' elements.

    it still works, but the link tabs don't highlight anymore when clicked, because they don't obtain 'current-menu-item' class.

    has anyone a trick for this ?

    thanks !

  2. flutch
    Member
    Posted 2 years ago #

    i could find a trick here :

    http://wordpress.org/support/topic/current_page_item-class-not-applied-to-custom-links-menu-items?replies=18

    you have to find the class assigned to body on the page that loads when you clic the link element on the menu, and give it same styles as .current-menu-item in your style.css, something like this :

    .current-menu-item, body.page-id-6 #idOfMenuItem{
    background-color:black;
    }

    hope this helps !

Topic Closed

This topic has been closed to new replies.

About this Topic