相反,您应该使用cat\\u ID
$data[$i][\'id\'] = $category->cat_ID;
get\\u categories()返回类别对象列表,其中包含:
"term_id": 7,
"name": "default",
"slug": "default",
"term_group": 0,
"term_taxonomy_id": 7,
"taxonomy": "category",
"description": "",
"parent": 0,
"count": 11,
"filter": "raw",
"cat_ID": 7,
"category_count": 11,
"category_description": "",
"cat_name": "Analiza",
"category_nicename": "default",
"category_parent": 0