Limit entries of WPQuery
-
Hello everybody,
when using this query, i don’t get unlimited entries, they get cut of at 10 entries.
$metaQuery = array( 'relation' => 'AND' ); $metaQuery[] = array( 'key' => 'isvisible', 'value' => '1', 'compare' => '=' ); $args = array( 'numberposts' => -1, 'post_type' => 'portfolio', 'meta_query' => $metaQuery ); $entries = array(); $the_query = new WP_Query($args); while($the_query->have_posts()){ $the_query->the_post(); $entries[] = array( "id" => get_the_id(), "title" => get_the_title(), "mapentry" => get_field("mapentry"), "street" => get_field("street"), "postal" => get_field("postal"), "city" => get_field("city"), "link" => get_permalink(), "thumbnail" => get_field("thumbnail") ); }
When i print_r this query, i get a:
DESC LIMIT 0, 10;
at the end…?So, where is the knot? ??
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Limit entries of WPQuery’ is closed to new replies.