get_posts Show all post return nothing! (2 posts)

  1. AliMH
    Posted 2 years ago #

    i'm using this query:

    $animeposts = array(
    					'post_type' => $queryvar,
    					'numberposts' => -1 ,
    					'tax_query' => array(                     //(array) - use taxonomy parameters (available with Version 3.1).
    						'relation' => 'AND',                      //(string) - Possible values are 'AND' or 'OR' and is the equivalent of ruuning a JOIN for each taxonomy
    							'taxonomy' => 'post_types',                //(string) - Taxonomy.
    							'field' => 'slug',                    //(string) - Select taxonomy term by ('id' or 'slug')
    							'terms' => $types[0]->slug,    //(int/string/array) - Taxonomy term(s).
    							'operator' => 'IN'                    //(string) - Operator to test. Possible values are 'IN', 'NOT IN', 'AND'.
    					'orderby' => 'title');

    in version 3.4 i have no problem but when i update to version 3.5 it return nothing!!
    i change id with query_posts and post_per_page=>-1 and nothing again!
    please someone shed light on it

  2. AliMH
    Posted 2 years ago #

    when i set numberposts => 300 it return 300 post from my query so other parameters of query is correct.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.