Pagination for custom post type on page template
-
Hello I am trying to add pagination to a page template which I am using to display a custom post type. I have looked around for a few hours but I haven’t come across clear set of instructions to follow.
Below is all the code from my page template php file. If someone could point me in the right direction it would be much appreciated.
I would appreciate any help on how to add the code for
<?php /** * Template Name: Testimonials Template * * This is the template for testimonials page. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ get_header(); ?> <?php include("2011-header-image.php"); ?> <div id="primary"> <?php get_sidebar(); ?> <div id="content" role="main"> <?php include("kinlay-breadcrumb.php"); ?> <hgroup> <h1 class="entry-title"><?php the_title(); ?></h1> </hgroup> <?php query_posts(array('post_type'=>'testimonials')); ?> <?php while ( have_posts() ) : the_post(); ?> <?php // The code must be inserted ahead of the call to the content global $more; $more = 0; ?> <?php get_template_part( 'content', 'testimonials' ); ?> <?php // comments_template( '', true ); ?> <?php endwhile; // end of the loop. ?> </div><!-- #content --> </div><!-- #primary --> <?php get_footer(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Pagination for custom post type on page template’ is closed to new replies.