<form method="post">
<input type="text" name="title" /> //Title
<input type="text" name="desc" /> //Description
<input type="text" name="age" /> //Age autor
</form>
이 코드는 새로운 기사에 제목과 설명을 추가합니다. 하지만 맞춤 날짜를 추가하려면 어떻게해야합니까? 전의. 연령 입력.게시 페이지에 맞춤 데이터를 추가하는 방법은 무엇입니까? 자료 Wordpress
$title = $_POST['title'];
$desc = $_POST['desc'];
$date = array(
'post_title' => $title,
'post_content' => $desc,
'post_status' => 'publish'
);
wp_insert_post($date);