I am working on a pagination feature in a web service I am writing, but my lack of math insight is killing me now.
I have a couple of keys: totalItems
, cu
For here I'm used code below and works fine.
$offset,
'post_type' => 'post',
'posts_per_page' => 30,
'category_name' => $cat_filter,
'post_status' => 'publish',
'paged' => $paged
);
$query = new WP_Query( $args_2 );
if ( $query->have_posts() ) :
while ( $query->have_posts() ) : $query->the_post();
?>