对于任何寻求更简单解决方案的人,您可以将以下CSS添加到后端,例如,假设所讨论的分类法是“eventtype”:
/* make sure tabs and the popular div itself are not shown */
#eventtype-pop,#eventtype-tabs{
display: none !important;
}
/* make sure the All Terms div is always shown, and remove extra spacing and styles */
#eventtype-all,#eventtype-all,#eventtype-all ul,#eventtype-all ul{
display: block !important;
padding:0;
margin:0;
background: transparent;
border:0;
}
您可以将此CSS添加到现有管理CSS或使用简单的管理挂钩:
add_action(\'admin_head\', \'adminCSS\');
function adminCSS(){
?><style type=\'text/css\'>
/* make sure tabs and the popular div itself are not shown */
#eventtype-pop,#eventtype-tabs{
display: none !important;
}
/* make sure the All Terms div is always shown, and remove extra spacing and styles */
#eventtype-all,#eventtype-all,#eventtype-all ul,#eventtype-all ul{
display: block !important;
padding:0;
margin:0;
background: transparent;
border:0;
}
</style><?php
}
这个示例显示了内联CSS,但您可以很好地添加一个包含所有所需规则的外部CSS。