I’m using wp_insert_term
to create categories, after the category is created I’d like to get its ID:
$cat_id = wp_insert_term($name, 'category', array('slug' => $slug) );
…however when I try to print $cat_id
I get Array
instead of the actual ID. I guess I have to state which part of the array I need, but I don’t really know what the variable for the ID would be?