• Hello,

    I have parent page that has two sub-pages under it. Under each one of these sub-pages there are another set of sub-pages. The structure looks like this

    – Portfolio (Main Page)
    — Clients
    — Travel
    —- Client 1
    —- Client 2
    —- Client 3
    —- Etc.
    — Health & Wellness
    —- Client 1
    —- Client 2
    —- Client 3
    —- Etc.
    — Etc.
    — Services
    — Service 1
    — Service 2
    — Service 3
    — Etc.

    What I would like to do is have two lists of subpages. One that displays all the child pages of “Clients” and another that displays all the child pages of “Services”. If anyone knows how to do this it would be greatly appreciated.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter erikw46

    (@erikw46)

    As I do more research into this I think it is also important to note that I would like to display the sub-pages of “Services” on the home page, and the sub-pages of “Clients” on the clients page. These lists will not appear on the Parent Page.

    I am using the above page hierarchy structure so that it is easy for my client to understand where to put the new pages he creates.

    Thread Starter erikw46

    (@erikw46)

    So after some more research I am wondering if this code can be modified to do what I want.

    <?php $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0'); if ($children) { ?>
    
    <ul>
    <?php echo $children; ?>
    </ul>
    
    <?php } ?>

    What I would like to be able to do is show the subpages of a certain page instead of the current page that I am on. I am guessing that I need to replace “.post->ID.'” with the ID number of the parent page whos subpages I want to display.

    Any ideas how to get this to work?

    Thanks,
    Erik

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Displaying Subpages in lists’ is closed to new replies.