2010-02-18 69 views
1
// Create post objects 
    $my_post = array(); 
    $my_post['post_title'] = 'Main Blog Post Title'; 
    $my_post['post_content'] = 'Main Blog Post Content'; 
    $my_post['post_type'] = 'post'; 


    // Insert the post into the database 
    wp_insert_post($my_post); 

我該如何通過腳本使這篇文章變得粘滯?WordPress通過腳本發佈粘貼?

回答

1
$post_id = wp_insert_post($my_post); 
stick_post($post_id); 
+0

完美。謝謝! – 2010-02-18 15:48:19