Support » Plugins » Calling Subpage Content

  • I’m using WP as a CMS for my client and have set up an about page. In that about page, I’ve set up 3 subpages that are individual staff bios. I know how to call the content of a page, but I need to dynamically call all the subpages of my about page, and return their content so I can display them dynamically.

    I’m NOT trying to list the subpages with wp_list_pages function. I don’t want links to the pages, I want the actual pages.

    I’m not doing posts as categories for the sake of the client. I want to keep the layout very simple. So they can edit the staff pages as a subpage of the about page.

    all I really need is to return each subpage’s ID to an array.

    Any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I had a similar requirement, just figured it out.

    You can put your subpages into an array thusly…
    $subpages = get_pages("child_of=".$post->ID);

    Then echo the subpage and column you need like so…

    Add this to your page template and just substitute ‘post_content’ with the required column. Wrap the echo in a for or while loop to give the client a way to add/remove employees by simply creating/deleting subpages.

    I used this technique to provide a client a way of giving pages different sidebar content for each page.

    I would like to create this kind of Page that lists Sub-Pages this way
    Can anybody help me with this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Calling Subpage Content’ is closed to new replies.