In questo articolo vedremo come ottenere i post di uno specifico autore in WordPress.
La soluzione รจ la seguente:
$author_id = 9;
$args = [
'post_type' => 'post',
'post_status' => 'publish',
'author' => $author_id
];
$query = new WP_Query( $args );