Paging with Pages and Child Pages
-
I have a parent page that all of the child pages feed into. I would like to limit it to 10 pages and then add a next/previous link. I’m not sure how to add the links. If anyone could help, that would be awesome.
Here is my current markup.
<?php
// Set up the arguments for retrieving the pages
$args = array(
'post_type' => 'page',
'numberposts' => 1,
'post_status' => null,
'post_parent' => $post->ID, // $post->ID gets the ID of the current page
'order' => ASC,
'orderby' => title,
);$subpages = get_posts($args);
// Just another WordPress Loop
foreach($subpages as $post) :
setup_postdata($post);
?><div class="entry">
<div class="story fRight">
<h3><?php the_title(); ?></h3>
<p><?php $customField = get_post_custom_values("lookExcerpt");if (isset($customField[0])) { echo $customField[0]; } ?></p></div>
<div class="gallery">
<?php the_content(); ?></div>
</div><!-- end .entry -->
<?php endforeach; ?>
- The topic ‘Paging with Pages and Child Pages’ is closed to new replies.