• Resolved StaLio

    (@stalio)


    Hi,

    I’m using WP 3.1 RC3 and when I’m trying to query with this code:

    <?php $portfolio = new WP_Query( array( 'tax_query' => array( array( 'taxonomy' => 'portfolio-options', 'field' => 'id', 'terms' => array( 20 ), 'operator' => 'NOT IN' )), 'post_type' => 'portfolio', 'orderby' => 'rand', 'order' => 'DESC', 'posts_per_page' => 10 )); ?>

    the posts aren’t random, while when I’m removing
    'tax_query' => array( array( 'taxonomy' => 'portfolio-options', 'field' => 'id', 'terms' => array( 20 ), 'operator' => 'NOT IN' )),

    this part, which is copied from the codex, they will. Can someone say what I’m doing wrong?

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Wp_Query not rand’ is closed to new replies.