問題描述
當我註冊分類時,我有這個我可能會隱藏的:
'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
)
);
謝謝,凱文
最佳解決方案
有點遲了,但我剛剛學到了如何去除分類雲。在您的分類標籤定義中,更改此行
'popular_items' => __( 'Popular Regions' ),
到這個
'popular_items' => NULL,
標籤雲將不再出現
參考文獻
注:本文內容整合自 Google/Baidu/Bing 輔助翻譯的英文資料結果。如果您對結果不滿意,可以加入我們改善翻譯效果:薇曉朵技術論壇。
