category__and only showing one category's posts
-
I’m using the following code but only the first category that I add in the category__and section is showing in the front end. I need both to show.
Not sure what I’m doing wrong.
<?php $my_query = new WP_Query(array( 'category__and' => array('471,282') )); var_dump( $cats ); while ( $my_query->have_posts() ) : $my_query->the_post(); ?> <?php the_title() ?> <?php endwhile; wp_reset_query(); ?>
Any ideas or help would be really appreciated.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘category__and only showing one category's posts’ is closed to new replies.