WP Category Dropdown

WP Category Dropdown

WP Category dropdown plugin is a simple plugin that displays the parent and child categories in a dropdown. You can use a shortcode to display the dropdown on a page or you can use the widget to display the dropdown on a sidebar.

[wpcd_child_categories_dropdown] is the shortcode that can be used. This shortcode accepts the following parameters similar to wp_dropdown_categories. The options shown here are the default options.

‘orderby’ => ‘name’,
‘order’ => ‘ASC’,
‘showcount’ => 0,
‘hierarchical’ => 1,
‘hide_empty’ => 1, //can be 0
‘exclude’ => ”,
‘include’ => ”,
‘default_option_text’ => (‘Parent Category’, ‘wpcd’), ‘default_option_sub’ => (‘Child Category’, ‘wpcd’),
‘category’ => ‘category’ // or any custom taxonomy

The default_option_text is the text that will show up as the first option in the dropdown. The default_option_sub will show up as the first option for the child category dropdown.

When using the shortcode, category can be any custom taxonomy.

You can also use the widget to display the dropdown on the sidebar. The widget also gives you a bunch of options to choose from.

wp category dropdown plugin widget screenshot

A quick demo of the plugin