views:

13

answers:

1

Hi, I am newbie for wordpress. Can anyone help me to display a list of posts under given parent post. I need to manage pagination for those child posts. I have used this code.

 $all_pages = get_pages('child_of='.$post->ID.'&sort_column=post_title');
foreach($all_pages as $pages)
           {
                     // here goes display of the post info
                   }

Thanks in advance.

A: 

Check out the function paginate_links(). Use it to create the pagination HTML, along with a bit of PHP logic to create the values for the limit and offset variables you can pass into get_pages().

TheDeadMedic