WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Styling one Page list differently from all others (3 posts)

  1. kalico
    Member
    Posted 7 years ago #

    I have a list (wp_list_pages) in the header of my site, which I want to have styled completely different from any other Page list. It is given class="page_item" by default, so I styled that parameter in my style sheet -- but of course, it is styling any WP-generated list of Pages on the whole site, which is not what I want. Is there any way around this?

  2. Joshua Sigar
    Member
    Posted 7 years ago #

    Wrap the list with special CSS id.

    <div id="header-list">
    ...
    wp_list_pages...
    ...
    </div>

    And in the css file...
    #header-list .page_item {
    ...
    }

  3. kalico
    Member
    Posted 7 years ago #

    Just like magic!! Thanks....this tip will apply to some other struggles I've been having as well. Yaay!

Topic Closed

This topic has been closed to new replies.

About this Topic