New answers tagged

0

You may use $wp_query->query_vars['posts_per_page'] = 25


0

Are they "Sticky Posts" ? Try to ignore them. In Your wp_query: 'ignore_sticky_posts' => 1


0

There is date_query which can handle this and an SQL query is not a good practice when you can take advantage of WordPress Query API: $pid = 1; // post ID here $args = array( 'posts_per_page' => -1, 'post_type' => 'post', 'date_query' => array( array( 'year' => get_the_date('Y', $pid), 'month' => ...


1

After some tweaking I've discovered that I've totally forgotten the relation into meta_query. so I've just added 'meta_query' => array( 'relation' => 'AND', $closed, $ends, $budgets, ), and it worked fine.



Top 50 recent answers are included