WordPress网站的投稿页面插入自定义栏目参数方式是什么?

  很多站长在搭建网站带上投稿功能是为了与用户能进行更好的互动,所以需要让网站实现该功能。投稿功能基本功能就是能编写标题和投稿内容,从而满足网站制作过程中某些功能的需求,但是有些站长想要投稿页面添加更多参数,那么WordPress网站的投稿页面插入自定义栏目参数方式是什么?

  更换的代码如下:

$tougao = array(
        "post_title" => $title,                //标题
        "post_content" => $post_content,       //内容
        "post_status" => "pending",            //待审
        "tags_input" => $tags,                 //标签
        "post_category" => array($category)    //分类
    );
    //将文章插入数据库
    $status = wp_insert_post( $tougao );
    if ($status != 0){
        //将自定义域写入最新待审文章
        global $wpdb;
        $myposts = $wpdb->get_results("
            SELECT ID
            FROM $wpdb->posts
            WHERE post_status = "pending"
            AND post_type = "post"
            ORDER BY post_date DESC
        ");
        add_post_meta($myposts[0]->ID, "tiwenzhe", $name);    //插入投稿人昵称的自定义域