WordPress WP Paging (plugin) pagination links not working….?

Good morning…

I have created a custom post type called Testimonials. To display them, I created a custom
page.php template using the following code:

Read More
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
?>    
<?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; ?>
<p><?php wp_paging(); ?></p>
<?php wp_reset_query(); ?>

The <p><?php wp_paging(); ?></p> is how I implement the plugin directly into the template file. I don’t understand why it isn’t working. The pagination links display, but clicking on one brings up Page Not Found.

I implemented the plugin in my category.php template and it works fine there.

And yes, I have re-visited my permalinks settings 🙂

Any help would be most appreciated.

Related posts

Leave a Reply

1 comment

  1.  <?php
    
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    
     ?>
    

    Make sure you have the above line in your call – as you reference $paged, but don’t show it in your question!