我的CPT有点问题。我创建了一些带有子类别的类别I wish display the subcategories in the select filter. 实际上,类别过滤器只显示第一级类别。我使用这个插件,Custom Content Type Manager.
类别筛选器:
类别列表:提前感谢您的回复。我的CPT有点问题。我创建了一些带有子类别的类别I wish display the subcategories in the select filter. 实际上,类别过滤器只显示第一级类别。我使用这个插件,Custom Content Type Manager.
类别筛选器:
类别列表:提前感谢您的回复。您需要使用manage_posts_extra_tablenav
过滤器,但您可以使用wp_dropdown_categories()
作用
唯一的两个$args
你真正感兴趣的是depth
和taxonomy
, 但我已经包括了下面所有的默认值。
完整的详细信息wp_dropdown_categories()
function can be found in the Codex
add_filter(\'manage_posts_extra_tablenav\', \'my_add_category_dropdown\');
function my_add_category_dropdown(){
$args = array(
\'show_option_all\' => \'\',
\'show_option_none\' => \'\',
\'option_none_value\' => \'-1\',
\'orderby\' => \'ID\',
\'order\' => \'ASC\',
\'show_count\' => 0,
\'hide_empty\' => 1,
\'child_of\' => 0,
\'exclude\' => \'\',
\'echo\' => 1,
\'selected\' => 0,
\'hierarchical\' => 0,
\'name\' => \'cat\',
\'id\' => \'\',
\'class\' => \'postform\',
\'depth\' => 0,
\'tab_index\' => 0,
\'taxonomy\' => \'category\',
\'hide_if_empty\' => false,
\'value_field\' => \'term_id\',
);
wp_dropdown_categories($args);
}
可以安全地编辑wp内容/语言/插件/woocommerce-ro\\U ro中的语言文件。mo(.po)?我这样问是因为我不想在插件更新时覆盖它们。抱歉,如果是愚蠢的问题。