Adding pagination to custom post loop in page

Viewed 25766

I have created a custom page template (testimonials-page.php) and in that template I am loading custom post type 'testimonials' using the following loop:

<?php query_posts(array(
'posts_per_page' => 5,
'post_type' => 'testimonials',
    'orderby' => 'post_date',
    'paged' => $paged
 )
 ); ?>

  <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

    <div id="post-<?php the_ID(); ?>" class="quote">
    <?php echo get_the_post_thumbnail($id, array($image_width,$image_height)); ?>
    <?php the_content(); ?>
    </div>
    <?php endwhile; ?>
    <?php wp_reset_query(); ?>

How do I add pagination to that? I installed the WP Paging plugin, and while that plugin works great when I call the pagination into category.php using:

<p><?php wp_paging(); ?></p>

Inserting the same thing into testimonial-page.php results in broken formatting and links that 404 on me.

2 Answers
Related