WordPress: impostare i tag di un post lato codice
In WordPress possiamo impostare i tag di un post lato codice.
In WordPress possiamo impostare i tag di un post lato codice.
La soluzione รจ la seguente:
$post_id = 34;
$post_tags = [ 21, 12 ];
wp_set_post_terms( $post_id, $post_tags );