1
我已经添加了标签元框和分类标准以允许我的CPT上的标签。但是,我无法在代码中找到参数来编辑“用逗号分隔标签”和“从最常用的标签中选择”。有谁知道这些过滤器或register_taxonomy参数?自定义本地标签元框
我已经添加了标签元框和分类标准以允许我的CPT上的标签。但是,我无法在代码中找到参数来编辑“用逗号分隔标签”和“从最常用的标签中选择”。有谁知道这些过滤器或register_taxonomy参数?自定义本地标签元框
我发现的论据get_taxonomy_labels其中有这些字段的适当的参数列表。我能够将这些添加到我现有的register_taxonomy()函数的标签中。
register_taxonomy('domain_tag',
array('domain_profiles'), /* if you change the name of register_post_type('domain_profiles', then you have to change this */
array('hierarchical' => false, /* if this is false, it acts like tags */
'labels' => array(
'name' => __('Related Domains', 'bonestheme'), /* name of the custom taxonomy */
'singular_name' => __('Domain', 'bonestheme'), /* single taxonomy name */
'search_items' => __('Search Domains', 'bonestheme'), /* search title for taxomony */
'all_items' => __('All Related Domains', 'bonestheme'), /* all title for taxonomies */
'parent_item' => __('Parent Domain', 'bonestheme'), /* parent title for taxonomy */
'parent_item_colon' => __('Parent Domain:', 'bonestheme'), /* parent taxonomy title */
'edit_item' => __('Edit Domain', 'bonestheme'), /* edit Domain taxonomy title */
'update_item' => __('Update Domain', 'bonestheme'), /* update title for taxonomy */
'add_new_item' => __('Add New Domain', 'bonestheme'), /* add new title for taxonomy */
'new_item_name' => __('New Domain Name', 'bonestheme'), /* name title for taxonomy */
// See get_taxonomy_labels for more arguments (below)
'separate_items_with_commas' => __('Separate domains with commas', 'bonestheme'),
'choose_from_most_used' => __('Choose from the most used', 'bonestheme'),
),
'show_admin_column' => true,
'show_ui' => true,
'query_var' => true,
)
);