这个函数用在自定义分类法中,获取对应文章所在的分类。
函数
get_the_term_list($id,$taxonomy,$before=\’\’,$sep=\’\’,$after= \’\’)
参数
$id – 帖子ID (必须)
$taxonomy – 分类法名称 (必须)
$before – 在列表之前,默认 ”
$sep – 使用的分割项
$after – 在列表之后,默认 ”
用法
$terms = get_the_term_list( $post->ID, \’xx-blog\’, \’\’, \’, \’, \’\’ );
echo $terms;
免责声明:以上内容(如有图片或文字亦包括在内)为网络用户上传并发布,不代表百科参考网的观点和立场,本平台仅提供信息存储服务,如有侵权直接联系Q-30513-26917,请注明出处:https://www.2333.org.cn/2333/12531.html