WP Query
-
Hi,
Having trouble with wp_query ‘category__and’. Cant get it to work.
This is my code:$args = array( 'post_type' => 'product', 'posts_per_page' => 10, 'category__and' => array( 20, 61, 74, 28 ), 'orderby' => 'date' ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?> // Info comes here. <?php endwhile; ?> <?php wp_reset_query(); ?>
Any idea what i’m doing wrong?
Tanks.
- The topic ‘WP Query’ is closed to new replies.