In WordPress possiamo impostare le categorie di un post lato codice.
La soluzione รจ la seguente:
$post_id = 20;
$post_cats = [ 12 ];
wp_set_post_categories( $post_id, [ $post_cats ] );
In WordPress possiamo impostare le categorie di un post lato codice.
La soluzione รจ la seguente:
$post_id = 20;
$post_cats = [ 12 ];
wp_set_post_categories( $post_id, [ $post_cats ] );