Title: Function for adding a term to a taxonomy
Last modified: August 19, 2016

---

# Function for adding a term to a taxonomy

 *  Resolved [David Gard](https://wordpress.org/support/users/duck_boy/)
 * (@duck_boy)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/function-for-adding-a-term-to-a-taxonomy/)
 * Hey all,
 * I’m pretty sure there is a fucntion for adding terms to a taxonomy by default
   when the taxonomy is created, but cannot remember it at all. Any body know it?
 * Thanks.

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

 *  [Micah Wood](https://wordpress.org/support/users/woodent/)
 * (@woodent)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/function-for-adding-a-term-to-a-taxonomy/#post-1650928)
 * I believe this is what you are looking for:
    [http://codex.wordpress.org/Function_Reference/wp_set_object_terms](http://codex.wordpress.org/Function_Reference/wp_set_object_terms)
 *  Thread Starter [David Gard](https://wordpress.org/support/users/duck_boy/)
 * (@duck_boy)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/function-for-adding-a-term-to-a-taxonomy/#post-1651080)
 * Sadly no – this one adds a term to a post/page/link/etc, where all I am looking
   to do is add a term to a taxonomy if it does not exist – don’t want any objects
   associated with it at this stage.
 * Thanks for coming back to me though.
 *  [marinig](https://wordpress.org/support/users/marinig/)
 * (@marinig)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/function-for-adding-a-term-to-a-taxonomy/#post-1651136)
 * Hi, try this:
 * wp_insert_term
 * Codex Page for info:
    [http://codex.wordpress.org/Function_Reference/wp_insert_term](http://codex.wordpress.org/Function_Reference/wp_insert_term)
 * Hope this help
 *  Thread Starter [David Gard](https://wordpress.org/support/users/duck_boy/)
 * (@duck_boy)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/function-for-adding-a-term-to-a-taxonomy/#post-1651171)
 * Thanks marinig, thats the one I was looking for!

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

The topic ‘Function for adding a term to a taxonomy’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [David Gard](https://wordpress.org/support/users/duck_boy/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/function-for-adding-a-term-to-a-taxonomy/#post-1651171)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
