Title: Return all post categories
Last modified: August 20, 2016

---

# Return all post categories

 *  Resolved [pg](https://wordpress.org/support/users/dethredic/)
 * (@dethredic)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/display-all-post-categories/)
 * The Codex has this great example:
 *     ```
       <?php
       $category = get_the_category();
       echo $category[0]->cat_name;
       ?>
       ```
   
 * The problem is that many of my posts have multiple categories. Any way to display
   them all?

Viewing 1 replies (of 1 total)

 *  [Joms](https://wordpress.org/support/users/jomsky/)
 * (@jomsky)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/display-all-post-categories/#post-2195491)
 * This should do it:
    [http://codex.wordpress.org/Function_Reference/the_category](http://codex.wordpress.org/Function_Reference/the_category)

Viewing 1 replies (of 1 total)

The topic ‘Return all post categories’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Joms](https://wordpress.org/support/users/jomsky/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/display-all-post-categories/#post-2195491)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
