Wordpress botunda içerikleri bu kod ile eklersin. Yaptığım eklenti şeklindeki bottan alıntıdır.
PHP:
$my_post = array();
$my_post['post_title'] = $isim;
$my_post['post_content'] = $icerigi;
$my_post['post_status'] = 'publish';
$my_post['post_author'] = 1;
$my_post['filter']=true;
$my_post['tags_input'] = $etiket;
$my_post['post_category'] = array($kategori);
$id=wp_insert_post($my_post);
sağollasın hocam şu kodla hallettim
$my_post = array(
'post_title' => wp_strip_all_tags( $_POST['post_title'] ),
'post_content' => $_POST['post_content'],
'post_status' => 'publish',
'post_author' => 1,
'post_category' => array(3)
);
// Insert the post into the database
if ($_POST)
wp_insert_post( $my_post );
ve denedim eklendi. çok sevindim eklendiğinni görünce
gerçi önümde daha çok yol var. örneğin bulunan kategorilerin listenip seçilebilir hale getirilmesi. neyse
http://codex.wordpress.org i kurcalıyorum bakalım..