Title: wp_insert_post function
Last modified: August 20, 2016

---

# wp_insert_post function

 *  Resolved [Daniel Rivera](https://wordpress.org/support/users/daniel-rivera/)
 * (@daniel-rivera)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/wp_insert_post-function/)
 * Two quick questions:
 * 1. Can I use multiple post_content fields on one form? (only one of them shows
   when it is posted)
 * 2. After a user submits a post is it possible to redirect them to a different
   page. (To avoid spam)
 * Example:
 *     ```
       <p style="font-size: 20px;">(required) <br /> [text* post_title] <br/>
       <table width="496">
       <td><p style="font-size: 14px;"><font color="#FF0000">*</font>(required) <br/>
          [textarea* post_content 25x10] <br/></p>
       <td><p style="font-size: 14px;"><font color="#FF0000">*</font>(required) <br/>
          [textarea* post_content 25x10] <br/></p>
   
       </table>
   
       [submit "Post"] <br/>
       ```
   
 * [http://wordpress.org/extend/plugins/form-to-post/](http://wordpress.org/extend/plugins/form-to-post/)

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

 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/wp_insert_post-function/#post-3381114)
 * 1. No I don’t think you can have a form work right with two fields having the
   same field name
 * 2. If you are using CF7 or FSCF, then you would need to use those plugins to 
   forward to a new page after successful submission. If writing your own form HTML,
   you could have the form submit to a different page and have the [capture-form-
   to-post] short code on that second page to capture the form submission.
 *  Thread Starter [Daniel Rivera](https://wordpress.org/support/users/daniel-rivera/)
 * (@daniel-rivera)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/wp_insert_post-function/#post-3381119)
 * My aim is to have two [textarea post_content] side by side like the example above(
   an A. and B. textarea); would this be possible?
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/wp_insert_post-function/#post-3381121)
 * No because:
 * 1. In a form, every field must have a different unique name. Here you have two
   fields named “post_content”. Only one of them gets submitted by the browser.
 * 2. The plugin only captured the post_content field.
 *  Thread Starter [Daniel Rivera](https://wordpress.org/support/users/daniel-rivera/)
 * (@daniel-rivera)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/wp_insert_post-function/#post-3381123)
 * Thanks for the feed back…
 * I’ll mark this topic as resolved.

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

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

 * ![](https://s.w.org/plugins/geopattern-icon/form-to-post.svg)
 * [Form to Post](https://wordpress.org/plugins/form-to-post/)
 * [Support Threads](https://wordpress.org/support/plugin/form-to-post/)
 * [Active Topics](https://wordpress.org/support/plugin/form-to-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/form-to-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/form-to-post/reviews/)

## Tags

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

 * 4 replies
 * 2 participants
 * Last reply from: [Daniel Rivera](https://wordpress.org/support/users/daniel-rivera/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/wp_insert_post-function/#post-3381123)
 * Status: resolved