WordPress make post sticky via script?

后端 未结 1 1900
春和景丽
春和景丽 2021-01-16 08:50
    // Create post objects
    $my_post = array();
    $my_post[\'post_title\'] = \'Main Blog Post Title\';
    $my_post[\'post_content\'] = \'Main Blog Post Content         


        
相关标签:
1条回答
  • 2021-01-16 09:30
    $post_id = wp_insert_post($my_post);
    stick_post($post_id);
    
    0 讨论(0)
提交回复
热议问题