I want to query my posts and only return one post from a custom taxonomy. Is this possible?
Here is an example:
I have a custom taxonomy called Author. I have 200 posts with various authors. I want to query and display 6 posts, but I don't want the same author ever repeated within the query. This is my query below. Thanks!
<?php $args = array('posts_per_page' => 6, 'orderby' => 'rand');
$taximg_loop = new WP_Query( $args );
while ( $taximg_loop->have_posts() ) : $taximg_loop->the_post();?>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>