I'm using PHP to pull values from arrays in an API and add them to custom taxonomy within custom post types in Wordpress.
$game_tags = array(
$games['tags'][0]['name'],
$games['tags'][1]['name'],
$games['tags'][2]['name'],
);
$term_taxonomy_ids = wp_set_object_terms( $games_slug, $game_tags, 'tags_list', true );
All works okay, and the custom taxonomy tags_list is populated with the values of $game_tags, but all values are unchecked.
Is there a way to automatically check all values while or after they are added?
Aucun commentaire:
Enregistrer un commentaire