我有一个自定义帖子类型。它具有自定义类别/分类法。它的名称是download_category,即register_taxonomy('download_category',.....
我需要知道自定义帖子类型的特定帖子的自定义类别ID和子句。
例如,如果120是我的自定义帖子类型ID,那么我如何在download_category分类下获得自定义帖子类型的分类。请帮忙
$ terms = get_the_terms(120,'download_category');
print_r($ terms);
看到结果。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句