• Resolved susien

    (@susien)


    Site in question

    I am making good progress on this site, but I’m stuck on how to add the current id to the menu. I used this to create the 2-level navigation. And I’d like to use Method 2 on this page to assign the current id.

    I’m not sure how to integrate the two of these techniques. Can someone help? 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • If you use that method 🙂 …
    … here is the basic idea:
    when on a subpage from the sidebar’s submenu – it’s parent Page in the top menu gets the class “current_page_item page_folder”, so you can use it to highlight it.

    And for the sidebar, you just use the simple
    #sidebar .current_page_item thing to highlight it.

    Does this help?

    Thread Starter susien

    (@susien)

    Thanks for your reply, moshu. The method you wrote in your article works perfectly. 🙂 But I do not understand what you just wrote. Where do I place what?

    Those classes above are assigned to the code by WP and that plugin.

    So, you just use them in your stylesheet to have them highlighted – the idea is in the Codex article you found, just use these classes that you have now.

    Thread Starter susien

    (@susien)

    I feel so dense. I added this to the CSS:

    .current_page_item {
     background: #01a0c7;
    }

    It’s only affecting the sidebar menu. I need the very top navigation and the sidebar navigation to be highlighed when appropriate.

    I don’t get it.

    I am writing part 2 now 🙂

    Thread Starter susien

    (@susien)

    I look forward to reading it! 🙂

    Thread Starter susien

    (@susien)

    Thank you so much, moshu! It’s working now! 🙂

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Adding Current to 2-level menu’ is closed to new replies.