Php 有一个以上的多个字段要发布到";发布“U内容”;
我正在尝试创建一个表单应用程序,其中包含多个字段来写入信息 这是我现在正在处理的代码Php 有一个以上的多个字段要发布到";发布“U内容”;,php,arrays,wordpress,variables,post,Php,Arrays,Wordpress,Variables,Post,我正在尝试创建一个表单应用程序,其中包含多个字段来写入信息 这是我现在正在处理的代码 $type = trim($_POST['Type']); $new_post = array( 'post_title' => $title, 'post_content' => $_POST['description'], 'post_parent' => 65, 'post_status' => 'publish', 'post_type'
$type = trim($_POST['Type']);
$new_post = array(
'post_title' => $title,
'post_content' => $_POST['description'],
'post_parent' => 65,
'post_status' => 'publish',
'post_type' => 'topic'
);
$topic_meta = array(
'forum_id' => $new_post['post_parent']
);
$topic_id = bbp_insert_topic($new_post, $topic_meta);
wp_redirect(get_permalink($topic_id));
exit;
我有更多字段,它们的名称是customfieldone
和customfieldtwo
,我想将它们添加到它从表单创建的主题中
上面的代码只会将description
中的文本发布到主题中