I have this code for front-page.php , I want pagination of custom post type displaying on front page. I am getting pagination links at the bottom of the page but the links are leading to a blank page with only header and footer instead of full content. What could be wrong?
<?php get_header(); ?>
<div class="container">
<?php
$contactsHome = new WP_Query(array(
'page' => get_query_var('page', 1),
'posts_per_page'=> 5,
'post_type'=> 'contacts',
));?>
<?php while($contactsHome->have_posts()){
$contactsHome->the_post(); ?>
<h2 class="headline"><a href="<?php the_permalink();?>"><?php the_title();?>
</a></h2>
<?php
} echo paginate_links(array(
'total' => $contactsHome->max_num_pages
));?>
wp_reset_query();
</div>
<?php get_footer(); ?>
define('WP_DEBUG', false);totrueto see your error and attach them in your question - Nasser Ali Karimitruebut not displaying any error. - Aurther