Title: Using the wp_insert_post function
Last modified: August 19, 2016

---

# Using the wp_insert_post function

 *  [healingapostle](https://wordpress.org/support/users/healingapostle/)
 * (@healingapostle)
 * [18 years ago](https://wordpress.org/support/topic/using-the-wp_insert_post-function/)
 * I have an administration application on mny deal site, when people add a coupon,
   we automatically create a post in mour forums formthe same form. I was looking
   to do the same to my wordpress blog. At first I tried just inserting into the
   DB, but then I found what looks to be a very useful function, but after including
   the post.php, functions.php and plugin.php so all of the called functions have
   their neccesary functions. It led me to include cache.php .
 * Now I’m getting an error saying that I performed get_ on a non object. I’m new
   to using object in php so I figure there must be an easy way for me to clal this
   function from my other programs that I must be missing…
 * can anyone point me in the right direction?

The topic ‘Using the wp_insert_post function’ is closed to new replies.

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 0 replies
 * 1 participant
 * Last reply from: [healingapostle](https://wordpress.org/support/users/healingapostle/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/using-the-wp_insert_post-function/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
