Support » Themes and Templates » How to add pagination

  • I am trying to add pagination to my blog page. I have the following to loop through my posts and grab 5, but don’t really know how to add pagination. I have tried a few things, but pagination doesn’t seem to show up. What do I have to do?

    Thank you so much for any help!

    	$query = array(
    		'posts_per_page' => '5',
    		'post_type' => 'post'
    	$queryObject = new WP_Query($query);
    	if ($queryObject->have_posts()) {
    		while ($queryObject->have_posts()) {
    			echo the_title();
    			echo the_excerpt();
    			} // End if statement
    	wp_reset_query();  // Restore global post data
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to add pagination’ is closed to new replies.