您的当前位置:首页 > 知识博客 > wordpress建站

WordPress检查分类法是否支持层级函数:is_taxonomy_hierarchica

时间:2024-03-14

WordPress函数is_taxonomy_hierarchical用来检查分类法是否支持层级

is_taxonomy_hierarchical( string $taxonomy )

函数参数

$taxonomy

字符串

分类法名称或对象

函数使用示例

if(!is_taxonomy_hierarchical('tag')) {
	echo '标签不支持层级';
}

扩展阅读

is_taxonomy_hierarchical()函数位于:wp-includes/taxonomy.php

相关函数:

  • taxonomy_exists()

  • get_taxonomy()


欢迎咨询/Welcome to inquire
tel/vx:18842938855
qq:1685522781
email:1685522781@qq.com

Copyright © 2019-2024 baidu.bond


Whatsapp
Powered by RRZCMS