Group first, 2nd, 3rd, etc posts by category terms

I’m still trying to determine exactly why this works, but it works. Still refining it and will post updates, but feel free anyone to improve upon this. It was modified from this post. <?php $a1 = get_posts(array( ‘post_type’ => ‘post’, ‘posts_per_page’ => ‘-1’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘category’, ‘field’ => ‘slug’, ‘terms’ => … Read more