Adding Pagination
-
Hello,
I am very new to WordPress and basically all I want to do is add pagination to this page: http://www.andrew-reynolds.com/ar_wordpress/?page_id=11
I have created a new template for this page and I am using custom post types to output the testimonials, but there are a lot more to add and I need the page paginated.
The current code for the template page looks like this:
<?php /** * Template Name: Testimonial * */ get_header(); ?> <hr class="slider"> <?php get_template_part( 'content', 'slider' ); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <section class="main_content"> <div class="container"> <div class="entry_box sitemap"> <?php the_content(); ?> <?php endwhile ; else: ?> <p>There are no posts or pages here</p> <?php endif; ?> <!--Outputs the testimonials--> <?php get_template_part( 'content', 'testimonials' ); ?> </div> <?php include('sidebar.php'); ?> </div> </section> <?php get_footer(); ?>I have been reading http://www.andrew-reynolds.com/ar_wordpress/?page_id=11 but I am unclear where to place the code (within the template page, functions.php or within the custom post types).
As I say I am very novice and built this theme using Treehouse tutorials, any help would be greatly appreciated.
Thanks, Sam.
The topic ‘Adding Pagination’ is closed to new replies.