customizing wp_list_pages css (5 posts)

  1. maestro42
    Posted 7 years ago #

    Okay. I want to add some css properties to my Pages List. Here is the problem that I am running into.

    when I add this:

    #pageNav .current_page_item a {
         color: #000;

    it turns the proper page (link) that you are on black. If I click on a link that has children pages, all the children pages are listed. However, they ALL inherit this property because they are all under the li of the current page. I can't figure out how to fix this. My code displays on my site as:

    <li>page 1</li>
    <li>page 2(parent)
    <li>child 1</li>
    <li>child 2</li>

    So when you click on page 2(parent) and then you ARE ON PAGE 2, it shows ALL the children links in black.

    Any ideas?

  2. maestro42
    Posted 7 years ago #

    I have tried a bunch of different things and nothing is working. Any clues?

  3. maestro42
    Posted 7 years ago #

    anyone ?

  4. maestro42
    Posted 7 years ago #

    no ideas?

  5. zeniph
    Posted 6 years ago #

    something like this should do it:

    #pageNav .current_page_item li a {
         color: red;

    Add that in addtion to your existing CSS selector

    You just needed to be more specific on how the child items are styled as they are inheriting the value from the parent A.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.