I'm loading posts via a query of a custom taxonomy called 'band':
$args = array(
'tax_query' => array(
array(
'taxonomy' => 'band',
'field' => 'slug',
'terms' => array('learn', 'trade', 'invest', 'spend')
)
),
'post_type' => 'post',
'showposts' => 50 );
Because some bands feature less content than others, by the end of the loop I'm left with lots of one kind and only a couple of another so in order to balance the content I want to get to the end of my loop and ask something like:
if( number of posts in band 'learn' <= 6 ) {
#load more learn posts
}
With this method I hope to get my most recent 50 posts but then ensure that I have a minimum of six in each band. I'm using Isotope to filter the Masonry layup so if the user hits the 'Learn' filter button I want to guarantee that the filtered results will find a minimum number of posts in any 'band'.