<?php 
/* 
Template Name: View All Members 
*/ 
?>
<?php get_header(); ?>

<?php $big = 999999999;
$args = array(
'post_type' => 'wp_member',
'country' => $country,
'meta_query' => $meta_query,
'posts_per_page' => '8',
'paged' => $paged
);

$wp_query = new WP_Query( $args );
while ( have_posts() ) : the_post(); 
// Code
endwhile;

<?php echo paginate_links( array('base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),'format' => '?paged=%#%','current' => max( 1, get_query_var('paged') ),'total' => $wp_query->max_num_pages) ); ?>

<?php get_footer(); ?>

 

Advertisements