Title: Cannot insert terms
Last modified: August 21, 2016

---

# Cannot insert terms

 *  [dsteen](https://wordpress.org/support/users/dsteen/)
 * (@dsteen)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/cannot-insert-terms/)
 * Hi Everyone,
 * I have the following problem:
 * I have written a plugin which adds a custom post type with a custom toxonomy 
   to my wordpress site. The plugin runs a cronjob every 10 minutes. When the cronjob
   is executed, data is fetched from a remote server. A part of the data contains
   terms that have to be associated with my custom post type. So i want to insert
   them as term in my custom taxonomy for my custom post type.
 * I tried to use wp_insert_term(), however after calling it nothing seems to be
   inserted. Did anyone face this problem aswell? and how did you solve it?
 * Thanks in advance.

Viewing 1 replies (of 1 total)

 *  [Piotr](https://wordpress.org/support/users/p396/)
 * (@p396)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/cannot-insert-terms/#post-4546187)
 * I think I can help you. I did some inserting into the WordPress database and 
   learned a few things. I didn’t use custom taxonomies but I thing it is close 
   enough to what you’re doing.
 * First of all – you’re saying that nothing seems to be inserted. Well, you need
   to be sure. If the data is added to the database and you can’t see the results
   on your website then the problem is that you’re missing something. When I tried
   to insert some CPTs into WordPress and assign categories, the categories wouldn’t
   show on my site because I didn’t increment the term_taxonomy_id in wp_term_taxonomy
   table.
 * But if there is no data inserted, there may be a problem with your connection
   to the remote server. Check the password. 😉
 * Try to read [this topic](http://wordpress.org/support/topic/looping-posts-with-content-from-different-database?replies=13).
   It gets interesting around post 6 or 7. You may find that using wp_insert_term()
   isn’t very efficient.

Viewing 1 replies (of 1 total)

The topic ‘Cannot insert terms’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [Piotr](https://wordpress.org/support/users/p396/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/cannot-insert-terms/#post-4546187)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
