Query Number of Loaded Posts in Loop
The literal implementation would be to: Create array variable While looping add to it ID of each post, using term name as key (so you have array of arrays) After main loop check the array and query additional posts if needed, using stored IDs for post__not_in so there are no duplicates Syntax will be something … Read more