wp_dropdown_categories
has a hierarchical and depth options available.
$args = array(
'show_option_all' => 'All Tshirt Categories',
'orderby' => 'ID',
'order' => 'ASC',
'hide_empty' => 1,
'child_of' => 0,
'hierarchical' => 1,
'depth' => 1,
'taxonomy' => 'tshirt_categories',
'hide_if_empty' => false ); ?>
<h2>By Category</h2>
<form action="<?php bloginfo('url'); ?>" method="get">
<div>
<?php wp_dropdown_categories($args); ?>
<input type="submit" name="submit" value="view" />
</div>
</form>
Related Posts:
- How to use wp_nav_menu to create a select menu dropdown?
- how to get value of wp_dropdown_categories
- Custom widget using get_categories select menu dropdown
- How to number the options in a wp_dropdown_pages() select?
- Filter Select results based on selection
- pages meta box – get_categories dropdown
- Multiple Dropdown’s with Submit Button
- wp_dropdown_categories – remove
- Form Value of drop down category + Translation of ‘show option none’
- Dropdown with category selection
- Saving two categories from two dropdowns in front end posting form
- Filter a second dropdown list when a value is chosen in the first one
- How to add HTML5 ‘required’ attribute to wp_dropdown_categories() without JavaScripts?
- Improving the Thesis built-in dropdown menu via javascript
- Add filter to wp_dropdown_pages() or wp_dropdown_categories() – no select container?
- Select dropdown not showing selected value php
- Add submenu using the bootstrap wp_nav_menu
- How to get a list of taxonomy terms which are being used only within certain post types?
- Drop-down menu with wp_dropdown_pages
- How to retain the values from dropdown category lists after wrong form submission?
- wp_dropdown_pages default value
- Make Categories a Dropdown Menu in Media Library
- Help with multiple dropdown tags search
- How to use wp_category_checklist()?
- wp_dropdown_categories and custom taxonomy + custom post type
- How to provide value for ‘selected’ on wp_dropdown_categories() for ‘multiple’ options
- Selected attribute of Drop down list
- Ultimate Member callback function issue
- How to make drop down post title
- Display tags from specific category in select fields
- Widget: Custom Post Type Post Listing Dropdown on Admin Side
- Filter table with dropdown
- Multiple level category drop-down from the WordPress dashboard
- Populate dropdown from database
- How to pick the default selected value in wordpress dropdown?
- Get the selected option from drop down list
- Get parent and children taxonomy in different dropbox
- how to save selected option in variable for rest api category filter
- wp_dropdown_categories() scripts working erratically on sidebar
- Dynamic dependent Dropdown lists for categories, sub-categories and posts
- How to use an array of categories as a dropdown?
- wp_dropdown_pages auto submit
- How do I display only two categories Instead of displaying all categories
- Dropdown Categories used in form shows no results when all is selected
- Trying to get variables in hacked category dropdown
- echo selected value from dropdown
- Multiple Custom Taxonomy Dropdowns Lists
- wp_list_categories walker without links on categories that have subcategories (to make a nested dropdown menu)
- Bootstrap drop down Navigation Menu in WordPress
- HTML dropdown setting not showing last saved value in the database
- Sorting dynamic select/dropdown for Contact Form 7 of Modern Tribe Events posts
- Multiple selection for wordpress widget
- wp_dropdown_pages : choose post status to list in dropdown
- Filter posts by categories ajax is showing nothing
- create drop down menu
- WordPress Customizer: Dropdown with Category output
- Filter By Category Dropdown List With Custom Taxonomies
- WP Dropdown Categories, display subcategories but not grandchildren categories?
- Custom Taxonomy Select Menu: Setting default option value?
- How to populate a dropdown menu with option selected?
- A dropdown with checklist
- Wp Dropdown Category Not Show Current As Title
- Link to subpages on the same page
- wp_dropdown_categories initial value
- go to home page when i select default in select-box
- Compare current post Category in select menu
- Using wp_dropdown_users and selected() function?
- working with result of wp_dropdown_pages()
- Exclude category from drop down list form
- How to set value selected using select2 jquery plugin
- Dropdown list control in a post
- How to show only the last two categories in a menu?
- Elementor: How to design Dropdown Select Box Navigation page like Chegg
- Dropdown category field inside repeatable metabox
- Trying to get categories and sub-category listing
- Load google font script based on optgroup label selected
- Get_term_meta() always returns false
- Woocommerce Category Sort Dropdown
- wp_dropdown_users array for param selected
- How to add custom option to wp_dropdown_categories?
- top primary menu drop down categories not showing
- add image in dropdown select
- Get Link of Page Selected through a Select Field in Custom Admin Page
- Default URL for category dropdown select option
- First ID won’t be excluded in wp_dropdown_pages with an $arg from tax_query
- PHP drop down menu for my get_category child of
- custom browse by
- Get category fixed in dropdown browse categories
- Categories dropdown with all values selected using wp_dropdown_categories
- Dropdown switching subcategories portfolio
- Create a drop down list within an active page not nav menu
- add custom option to get_categories dropdown
- Taxonomy for custom post type not found
- How to make a drop down menu with categories
- Separate categories parents, childs and grandchilds in dropdowns
- Output dropdown results into Woocommerce Order details
- PayPal button with drop down menu not working [closed]
- Open WordPress Page from selected option dropdown
- How to solve dropdown menu problem [closed]
- WordPress shortcode select option not working [closed]