Pagination in custom query in a category page
Meta query must be done with a nested array. So it may look more like this: $query = new WP_Query( array( ‘meta_query’ => array( array( ‘key’ => ‘duedate’, ‘value’=> $today, ‘compare’ => ‘>=’, ), ), ‘paged’ => $paged, ‘posts_per_page’=>’20’ ) );