Title: Checking Categories for Posts
Last modified: August 19, 2016

---

# Checking Categories for Posts

 *  [cricketsoda](https://wordpress.org/support/users/cricketsoda/)
 * (@cricketsoda)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/checking-categories-for-posts/)
 * Is there any way I can check a category to see if it has posts. Something like:
 *     ```
       <?php if category_has_posts() {?>
   
       Then display this.
   
       <?php } ?>
       ```
   
 * I can’t seem to figure out how to do this, or what I should even search for. 
   My search for if category has posts wordpress turned up blank.
 * Thank you for all your help.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [cricketsoda](https://wordpress.org/support/users/cricketsoda/)
 * (@cricketsoda)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/checking-categories-for-posts/#post-728687)
 * Even perhaps a check if a certain posts exists then print this.
 *  Thread Starter [cricketsoda](https://wordpress.org/support/users/cricketsoda/)
 * (@cricketsoda)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/checking-categories-for-posts/#post-728694)
 * Or even if a category has 20 posts display this…

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Checking Categories for Posts’ is closed to new replies.

## Tags

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

 * 2 replies
 * 1 participant
 * Last reply from: [cricketsoda](https://wordpress.org/support/users/cricketsoda/)
 * Last activity: [18 years, 2 months ago](https://wordpress.org/support/topic/checking-categories-for-posts/#post-728694)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
