我有一种定制的邮政类型。它有一个自定义类别/分类法。它的名字是download_category i.e register_taxonomy(‘download_register_taxonomy’).
我需要知道自定义类别id和弹格的一个特定的帖子在定制的帖子类型。
例如,如果120是我的自定义post类型id,那么如何在download_category分类法下获得定制post类型的分类。请帮帮忙
发布于 2014-12-09 07:14:57
$terms = get_the_terms(120,'download_category‘);
print_r($terms );
看看结果。
发布于 2014-12-09 05:15:29
通过使用
get_the_terms( 120, $taxonomy );获取自定义post类型的分类
https://stackoverflow.com/questions/27371563
复制相似问题