[resolved] Styling only the headpages (3 posts)

  1. Runt306
    Posted 7 years ago #

    Hi all,

    This is probably an easy question, but I can't seem to find it in the codex or here.

    I used the command wp_list_pages to list all the pages. Now I want to style only the headpages. What CSS selector should I use for that?

    With headpage I mean the pages that are on top of every other page. Just like the About page you get with a fresh install of WordPress.


  2. kristarella
    Posted 7 years ago #

    Codex info about that is here:

    Essentially you need to put wp_list_pages in some kind of identifying thing (a div or li with an id or class, lets say for this example: div class="pages")
    then you style it with

    .pages ul li {
    put your special styles here

    then because that will be inherited by the child pages

    .pages ul li ul li {
    normal styles back in here

  3. Runt306
    Posted 7 years ago #

    Thanks! that worked :-)

Topic Closed

This topic has been closed to new replies.

About this Topic