如何从自定义分类管理页面中删除标签云?


10

当我注册分类法时,我认为这可能会将其隐藏:

'show_tagcloud' => false

默认类别页面不显示标签云,那么为什么我的自定义分类页面如何禁用?

在此处输入图片说明

register_taxonomy('gmc_region', 'recipe', 
array(
  'labels' => array( 
    'name' => _x( 'Regions', 'taxonomy general name' ), 
    'singular_name' => _x( 'Region', 'taxonomy singular name' ),
    'popular_items' => __( 'Popular Regions' ),
    'search_items' => __( 'Search Regions' ), 
    'all_items' => __( 'All Regions' ), 
    'parent_item' => __( 'Parent Region' ), 
    'parent_item_colon' => __( 'Parent Region:' ), 
    'edit_item' => __( 'Edit Region' ), 
    'update_item' => __( 'Update Region' ), 
    'add_new_item' => __( 'Add New Region' ), 
    'new_item_name' => __( 'New Region Name' ), 
    'menu_name' => __( 'Regions' ), 
  ),
  'rewrite' => array( 
    'slug' => 'regions',
    'with_front' => false
  ), 
  'show_in_nav_menus' => false,
  'show_ui' => false,
  'show_tagcloud' => false
)
);

谢谢,凯文


我们可以看到您的代码来注册您的分类法吗?
贾里德(Jared)

Answers:


17

有点晚了,但我刚刚学习了如何删除分类法云。在分类标签定义中更改此行

'popular_items' => __( 'Popular Regions' ),

对此

'popular_items' => NULL,

并且标签云将不再出现

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.