Reputation: 5105
I'm trying to get a page list all of its subpages in the content area..however when I use the code below it is only displaying 10 of the 40 subpages...
Please let me know how to fix it?
<ul class="subpages-pro" style="margin-top:20px;">
<span style="display:none;"><?php the_ID(); ?></span>
<?php $parent = $post->ID; ?>
<?php
query_posts('order=ASC&post_type=page&post_parent='.$parent);
while (have_posts()) : the_post();
?>
<?php $image_thumb = get_post_meta($post->ID, 'image-thumb', true); ?>
<li><?php the_post_thumbnail(); ?>
<h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<?php the_excerpt(); ?>
</li>
<?php endwhile; ?>
</ul>
Upvotes: 0
Views: 964
Reputation: 392
If you pass the argument numberposts = -1 to your query_posts function, all of the pages will be displayed.
So, change your call to query_posts to look like:
query_posts ('order=ASC&post_type=page&numberposts=-1&post_parent='.$parent)
Upvotes: 2