Hey Leute,
hab hier ein Beispielscript von codex.wordpress:
PHP
<?php
// Create post object
$my_post = array(
'post_title' => 'My post',
'post_status' => 'publish',
'post_author' => 1,
'post_category' => array(8,39)
);
// Insert the post into the database
wp_insert_post( $my_post );
?>
Alles anzeigen
Das Script tut genau das, was ich möchte. Nur brauche ich noch die ID des neu erstellen Artikels, sobald man das Script ausführt. Wie stell ich das an?
Mfg