Title: manipulating a posts categories
Last modified: August 18, 2016

---

# manipulating a posts categories

 *  [Brian Santalone](https://wordpress.org/support/users/captainbri/)
 * (@captainbri)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/manipulating-a-posts-categories/)
 * after a posting i have a set of categories which im using to display data on 
   different parts of my site, but some of these TAGS need to be hidden.. the following
   code hides 1 category but i am unsure of how to edit this to put 3 categories
   in it.
 * <?php
    foreach((get_the_category()) as $cat) { if ($cat->cat_ID != “19”) { echo‘
   cat_ID . ‘”>’ . $cat->cat_name . ‘, ‘; } } ?>

Viewing 1 replies (of 1 total)

 *  Thread Starter [Brian Santalone](https://wordpress.org/support/users/captainbri/)
 * (@captainbri)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/manipulating-a-posts-categories/#post-588100)
 * PLEASE help!!!! this is the last thing i need to get my site up and running..

Viewing 1 replies (of 1 total)

The topic ‘manipulating a posts categories’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [post](https://wordpress.org/support/topic-tag/post/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [Brian Santalone](https://wordpress.org/support/users/captainbri/)
 * Last activity: [18 years, 11 months ago](https://wordpress.org/support/topic/manipulating-a-posts-categories/#post-588100)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
