Display UNIQUE Categories for Posts
-
I have 2 separate groups of Categories that a post can be classified in: Client & Medium.
I’m trying to display all the Clients (that have posts) and all the Mediums (that have posts), but not I’m actually displaying the posts.
The problem I’m running into that is that, if a Client has many Posts, I don’t want to display the Client more than once. The same applies for medium. If a Client has more than one post in a certain medium, I don’t want to display that medium more than once.
Everything has to be unique.
What’s the best way of going about this? If I’m in the Loop, is there a way to only pull unique Categories? Or do I have to gradually put them all in an array, and check that they don’t exist before adding a new one?
The topic ‘Display UNIQUE Categories for Posts’ is closed to new replies.