Title: auto generating a category
Last modified: August 19, 2016

---

# auto generating a category

 *  [seansnv](https://wordpress.org/support/users/seansnv/)
 * (@seansnv)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/auto-generating-a-category/)
 * I have a page template that looks for all posts within a category with the same
   name as the title of the page. This requires that when a new page is created 
   with this template that a new category is created at the same time. It would 
   be ideal if I could auto create a category of the same name when the template
   is first applied.
 * So, how do I create a category using php?

The topic ‘auto generating a category’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [seansnv](https://wordpress.org/support/users/seansnv/)
 * Last activity: [17 years, 11 months ago](https://wordpress.org/support/topic/auto-generating-a-category/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
