wp_insert_category() setting the ‘cat_ID’ gives not array error
Ok here is the solution I found: You are not meant to set IDs when creating new objects like categories. Instead I created the parent categories first using something like $my_cat = array( ‘cat_name’ => ‘Community News & Views’, ‘category_nicename’ => ‘news’, ‘taxonomy’ => ‘category’ ); $my_cat_id = wp_insert_category($my_cat); In a second step I create … Read more