// Create post object $my_post = array( 'post_type' => 'page', 'post_title' => 'My post', 'post_content' => 'This is my post.', 'post_status' => 'publish', 'post_author' => 1 ); // Insert the post into the database wp_insert_post( $my_post );
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)