does “wp_insert_post” insert post with a specific category ???
-
I try toi use this code, but don’t work:
// create object class
class wm_mypost {
var $post_title; var $post_content; var $post_categories; var $post_status; var $post_author; }
//// my first object :-) $wm_myobject = new wm_mypost();
// fill object $wm_myobject->post_title = $title; $wm_myobject->post_content = $content; $wm_myobject->post_categories = $id_category; $wm_myobject->post_status = 'publish'; $wm_myobject->post_author = $id_author;
// feed object to wp_insert_post wp_insert_post($wm_myobject);
Please help me
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘does “wp_insert_post” insert post with a specific category ???’ is closed to new replies.