WordPress: modificare l'autore di un post lato codice
In questo articolo vedremo come modificare l'autore di un post in WordPress.
In questo articolo vedremo come modificare l'autore di un post in WordPress.
La soluzione รจ la seguente:
$post_id = 11;
$new_post_author = 8;
$args = [ 'ID' => $post_id, 'post_author' => $new_post_author ];
wp_update_post( $args );