Pagenavi pagination via wp-query in functions.php showing same content for each page
Finally solved this with: function my_filter_where( $where=”” ) { global $wp_query; if (is_array($wp_query->query_vars[‘post_status’])) { if (in_array(‘future’,$wp_query->query_vars[‘post_status’])) { // posts today into the future $where .= ” AND post_date > ‘” . date(‘Y-m-d’, strtotime(‘now’)) . “‘”; } } return $where; } add_filter( ‘posts_where’, ‘my_filter_where’ ); And: <?php $wp_query = array( ‘post__not_in’ => array(4269), ‘paged’ => get_query_var(‘paged’), … Read more