Support » Theme: Theron Lite » Current page

  • Resolved yuncreativelabs


    I’m having troubles highlighting the current page I am in. I tried using the wp tag, like “li.current_page_item a” but it’s not working…

    This is how the menu gets called:

    <div id="menu_wrap"><div class="center"><div id="topmenu"><?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?></div></div></div>

    Thanks in advance!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Andrew Nevins


    Forum moderator

    Use a Browser Inspector Tool to explore what class is applying to your list. Alternatively view your webpage’s source and search there.

    <div id="menu_wrap">
    <div class="center">
    <div id="topmenu">
    <div class="menu-header">
    <ul id="menu-menu1" class="menu">
    <li id="menu-item-26" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-26">
    <a href="#">home</a></li>
    <li id="menu-item-33" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-33"><a href="#">Gallery</a>

    then following the other elements…

    Without seeing the site, almost impossible to help with things like this — as CSS is totally site-specific and may be affected by other CSS code on a page.



    Forum Moderator

    is that the html of the menu when you are on the home page or gallery page?

    is there any ‘current-menu-item‘ or similar in any of the ‘following other elements’?

    sorry the code I posted wasn’t helpful at all.

    I am on the “about” page, which is exactly as “gallery”..
    the line you are talking about (the one with the “current”) is this:

    <li id="menu-item-40" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-38 current_page_item menu-item-40">
    <a href="#">About</a>

    I know it says “current-menu-item” but I can’t get it to work in the css… 🙁

    Moderator Andrew Nevins


    Forum moderator

    Perhaps you’re not using specific enough selectors.

    Current menu item likely shows up in every menu item? If you want to target a specific page, you need to use a unique class or id for that page — perhaps id=”menu-item-40″ ?

    oh god…I think I might need a little help on this.
    it’s just not fair that when it is about me things are always this complicated…gah!

    I’ll give it ago as soon as I have a little more time…thank you very much for your help guys!
    if you hear from me again here it means I have failed :/

    Hi again…
    I tried it all but couldn’t get it to work.
    If someone would give some of his time to figure it out I’d be very grateful.
    This is the link pointing to one of the pages:

    Thanks a lot 🙁

    Just writing to let you know that I won.
    thanks everybody for your help though!!!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Current page’ is closed to new replies.