File: /www/wwwroot/biographybirthday.com/wp-content/themes/bio/page-all.php
<?php
/**
* Template Name: All Posts
*
* List Biography of those whose birthday is today
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package bio
*/
$title = 'All Biographies';
?>
<?php get_header(); ?>
<div class="page-wrapper">
<div class="list-page archive-page">
<div class="container people-list todays-birthdays">
<div class="row list-title-sub">
<div class="col-xs-12 text-center">
<h3 class="page-title"><?php echo $title;?></h3>
</div>
</div>
<?php
// $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$paged = basename($_SERVER["REQUEST_URI"]);
// echo $paged;exit;
$loop = new WP_Query(array(
'post_type' => 'post',
'paged' =>$paged,
'posts_per_page'=> 8
));
// Pagination fix
$temp_query = $wp_query;
$wp_query = NULL;
$wp_query = $loop;
// Pagination fix
?>
<?php if ( $loop->have_posts() ) : ?>
<div class="row">
<?php while ( $loop->have_posts() ) : $loop->the_post();?>
<?php hm_get_template_part('parts/content-single',array('show_category'=>true));?>
<?php endwhile;?>
</div>
<?php wp_reset_postdata();?>
<div class="row">
<?php the_posts_pagination( array(
'mid_size' => 2,
'prev_text' => __( 'Previous', 'bio' ),
'next_text' => __( 'Next', 'bio' ),
) );
// Reset main query object
$wp_query = NULL;
$wp_query = $temp_query;
?>
</div>
<?php else:?>
<div class="row">
<div class="alert text-center">
No data found !!!
</div>
</div>
<?php endif;?>
</div>
</div>
</div>
</div>
<?php get_footer();?>