How to show only one post for each categories of taxonomy of custom post that contains a specific custom field
<?php // get all terms of the `bank` taxonomy $banks = get_terms( array( ‘taxonomy’ => ‘bank’, // more arguments can be used, see (1) below the code ) ); // look through banks, picking one post from each foreach ( $banks as $bank ) { $args = array( ‘post_type’ => ‘account’, // your custom post … Read more