<?php
$query = new WP_Query();
$query->query(array('post_type' => 'testimonial' , 'paged' => get_query_var('paged'),
'order'=>'DESC'));

while ( $query->have_posts() ) : $query->the_post();

$post_id = $query->post->ID;
the_title(); //title
the_content(); //content

endwhile;

wp_pagenavi( array('query'=> $query ));

// Reset Query
wp_reset_query();

?>

Install and activate WP-PageNavi Plugin for that.

Advertisements