Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $new_post = array(
- 'post_title' => '',
- 'post_content' => '',//$post_title,
- 'post_status' => 'publish', // Choose: publish, preview, future, etc.
- 'post_type' => 'name_of_custom_post_type', // Set the post type based on the IF is post_type X
- 'post_author' => 1
- );
- $new_post_id = wp_insert_post($new_post); // http://codex.wordpress.org/Function_Reference/wp_insert_post
- if($new_post_id){
- update_post_meta($new_post_id, 'ip', $ip);
- update_post_meta($new_post_id, 'email', $email);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement