WordPress.org

Support

Support » How-To and Troubleshooting » Problem with current menu item, when I choose submenu item

Problem with current menu item, when I choose submenu item

  • Hi
    I tried to find anwser for a few days but I couldnt.
    Hope somebody polite will help me:-)

    My menu, has few menu items wich are custom links.
    Each custom link redirect to the page with widget submenu.
    The problem is that whan I click on custom link main menu item is not highlightes. My idea is to have effect, that whan I clik on custom menu item and later on sme subepage this custom link still will be highlighted.
    Everywhere except homepage U can see the path of echa part of site.
    Site: http://www.sgp.pl
    Menu custom links: Zakres uslug, Specjalizacje.

    Part of CSS code:

    #top-menu ul.drop-menu li a {
    display: block;
    height: 20px;
    line-height: 20px;
    font-size: 14px;
    font-weight: bold;
    color: #212121;
    border-left: 5px solid white;
    border-right: 5px solid white;

    }
    #top-menu ul.drop-menu li.current_page_item a:link,
    #top-menu ul.drop-menu li.current_page_item a:active,
    #top-menu ul.drop-menu li.current_page_item a:visited {
    display: block;
    height: 20px;
    line-height: 20px;
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    background-color: #bb1f27;
    border-left: 5px solid #bb1f27;
    border-right: 5px solid #bb1f27

    }

    Source code of top menu:

    <nav id=”top-menu” class=”hk-menu”><ul id=”menu-menu-glowne” class=”drop-menu”><li id=”menu-item-26″ class=”menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-6 current_page_item menu-item-26″>Home
    <li id=”menu-item-2295″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-2295″>Aktualności
    <li id=”menu-item-2427″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-2427″>O kancelarii
    <li id=”menu-item-22″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-22″>Zespół
    <li id=”menu-item-316″ class=”drop-menu menu-item menu-item-type-custom menu-item-object-custom menu-item-316″>Zakres usług
    <li id=”menu-item-377″ class=”drop-menu menu-item menu-item-type-custom menu-item-object-custom menu-item-377″>Specjalizacje
    <li id=”menu-item-2296″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-2296″>Publikacje
    <li id=”menu-item-2338″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-2338″>Kontakt
    </nav>

    Soure code of submenu for Specjalizacje top menu item:
    <nav id=”top-menu” class=”hk-menu”><ul id=”menu-menu-glowne” class=”drop-menu”><li id=”menu-item-26″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-26″>Home
    <li id=”menu-item-2295″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-2295″>Aktualności
    <li id=”menu-item-2427″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-2427″>O kancelarii
    <li id=”menu-item-22″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-22″>Zespół
    <li id=”menu-item-316″ class=”drop-menu menu-item menu-item-type-custom menu-item-object-custom menu-item-316″>Zakres usług
    <li id=”menu-item-377″ class=”drop-menu menu-item menu-item-type-custom menu-item-object-custom current-menu-item menu-item-377″>Specjalizacje
    <li id=”menu-item-2296″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-2296″>Publikacje
    <li id=”menu-item-2338″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-2338″>Kontakt
    </nav>

  • The topic ‘Problem with current menu item, when I choose submenu item’ is closed to new replies.