Hmm. I’m not sure exactly how to fix this, but you could look at the code in the WP-PageNavi plugin for how they do category page navigation/pagination.
https://wordpress.org/plugins/wp-pagenavi/
this is working on my local try it out
global $wp_query;
$big = 999999999; // need an unlikely integer
$links = 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,
'prev_text' => '<i class="fa fa-left"></i>',
'next_text' => '<i class="fa fa-right"></i>'
) );
?>
<div>
<?php echo $links; ?>
</div>
can you also use pastebin to paste your archive/ category page code may be some loop issue in there
it only helps
functions
function remove_page_from_query_string($query_string)
{
if ($query_string[‘name’] == ‘page’ && isset($query_string[‘page’])) {
unset($query_string[‘name’]);
list($delim, $page_index) = split(‘/’, $query_string[‘page’]);
$query_string[‘paged’] = $page_index;
}
return $query_string;
}
add_filter(‘request’, ‘remove_page_from_query_string’);
function fix_category_pagination($qs){
if(isset($qs[‘category_name’]) && isset($qs[‘paged’])){
$qs[‘post_type’] = get_post_types($args = array(
‘public’ => true,
‘_builtin’ => false
));
array_push($qs[‘post_type’],’post’);
}
return $qs;
}
add_filter(‘request’, ‘fix_category_pagination’);
This problem Permalink
I’m not clear on what your problem is. Please state what problem you are now having in light of your recent code and what should be happening instead.