WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

hey guys, I have no idea how to solve the following problem. I'd love to have a page-template that lists all it's child-pages but with the content.

e.g. Imagine I have a page called "WORK. And "Work" has childpages like "Work 01", "Work 02", "Work 03", etc.

I don't just want "WORK" to list the names of the childpages as a navigation, but rather just show all the pages under each other!

Any idea how to solve that? Thank you.

share|improve this question
up vote 3 down vote accepted

You would need to create a page template and query those pages directly.

                    $args = array(
                    'post_type' => 'page',
                    'post__in' => array(430,436,433), //The Page IDs you want to query
                     'order'    => 'ASC'

                $page_query = new WP_Query($args);

If you wanted to do this automatically and get the child pages of the current page you could use something like this:

// Set up the arguments for retrieving the pages
$args = array(
    'post_type' => 'page',
    'numberposts' => -1,

// $post->ID gets the ID of the current page
'post_parent' => $post->ID,
    'order' => ASC,
    'orderby' => title
 $subpages = get_posts($args);
 // Just another WordPress Loop
 foreach($subpages as $post) :
<h4><?php the_title(); ?></h4>

 <?php the_content(); ?>

 <?php endforeach; ?>
share|improve this answer
thank you, just perfect. – mathiregister Apr 30 '11 at 9:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.