【发布时间】:2015-12-05 21:58:38
【问题描述】:
我无法在 WordPress 中使用 acf(选择多个)获取分类的名称。
$categories_user = get_field('product__services', $company_id);
当我var_dump($categories_user) 它输出:
array(2) {
[0]=> object(stdClass)#3816 (10) {
["term_id"]=> int(28)
["name"]=> string(17) "sous category 2-4"
["slug"]=> string(17) "sous-category-2-4"
["term_group"]=> int(0)
["term_taxonomy_id"]=> int(28)
["taxonomy"]=> string(11) "project_cat"
["description"]=> string(0) ""
["parent"]=> int(25)
["count"]=> int(2)
["filter"]=> string(3) "raw"
}
[1]=> object(stdClass)#3818 (10) {
["term_id"]=> int(34)
["name"]=> string(13) "Ywz categorie"
["slug"]=> string(13) "ywz-categorie"
["term_group"]=> int(0)
["term_taxonomy_id"]=> int(34)
["taxonomy"]=> string(11) "project_cat"
["description"]=> string(0) ""
["parent"]=> int(0)
["count"]=> int(0)
["filter"]=> string(3) "raw"
}
}
【问题讨论】:
-
您能否详细解释一下您的问题,以便我们为您提供帮助?
标签: wordpress advanced-custom-fields