Title: Display UNIQUE Categories for Posts
Last modified: August 20, 2016

---

# Display UNIQUE Categories for Posts

 *  [dtirer](https://wordpress.org/support/users/dtirer/)
 * (@dtirer)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/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.

## Tags

 * [categories](https://wordpress.org/support/topic-tag/categories/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * 0 replies
 * 1 participant
 * Last reply from: [dtirer](https://wordpress.org/support/users/dtirer/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/display-unique-categories-for-posts/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
