I presume there is an open option html element before that code provided. After that select tag is opened and before you run through that loop echo out a blank option with value=””
Related Posts:
- Dropdown with category selection
- Saving two categories from two dropdowns in front end posting form
- Get id of category from drop down menu
- How to add HTML5 ‘required’ attribute to wp_dropdown_categories() without JavaScripts?
- How to retain the values from dropdown category lists after wrong form submission?
- 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
- Additional form options based on category selected not working
- wp_dropdown_categories() scripts working erratically on sidebar
- How to use an array of categories as a dropdown?
- 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
- wp_list_categories walker without links on categories that have subcategories (to make a nested dropdown menu)
- Filter posts by categories ajax is showing nothing
- WordPress Customizer: Dropdown with Category output
- Filter By Category Dropdown List With Custom Taxonomies
- A dropdown with checklist
- Wp Dropdown Category Not Show Current As Title
- wp_dropdown_categories initial value
- Exclude category from drop down list form
- Trying to get categories and sub-category listing
- Get_term_meta() always returns false
- Woocommerce Category Sort Dropdown
- How to add custom option to wp_dropdown_categories?
- custom browse by
- Get category fixed in dropdown browse categories
- Categories dropdown with all values selected using wp_dropdown_categories
- Taxonomy for custom post type not found
- Form Value of drop down category + Translation of ‘show option none’
- Could not insert term into the database
- Activate Gutenberg in category-descriptions
- How would I increase the Author Role to be able to add a new category?
- How to remove the parentheses from the category widget
- Only show category to certain user levels without plugin
- How to: 301 Redirect /category/ to /customname/
- Custom Query to search through categories
- Get sticky post from category?
- Display one latest post from multiple categories
- Remove Archive Headline and Archive Intro Text fields on category and tag archive pages in WordPress Admin with Genesis framework
- How Do I Merge Categories With phpMyAdmin
- Display name of the last child category
- Edit the markup of categories list
- Show category children, one level
- Viewing category pages without the word ‘category’ in URL
- How to view WordPress’ default category IDs?
- Random taxonomy category list
- how to change template?
- Multiple Domain Names – One WP Install (non-Multisite) – Default Each Domain name to Product Category WooCommerce
- Show all posts for a specific category/author
- Hard coded main navigation
- Resort get_categories
- The arrangement of categories always change while posting article
- Woocommerce custom category page with pagination [closed]
- wp_list_pages() exclude category
- Limit categories and it’s subcategories for specific group of users
- Get the ID of 10 Latest Pages stored in a WordPress Category
- Admin: Navigation Menus do not show empty categories/taxonomies in the list’s search tab
- getting post data in functions.php
- Category specific order
- Remove the number of posts displayed in wp_list_categories()
- WP_safe_redirect not working
- related articles using shortcodes
- “Virtual category page” based on a custom field filter
- Rebuilding a Site: How to Show Several Category Posts in Woo Framework Theme?
- Get categories related to particular category
- the_category() doesn’t working in wp_query loop
- Displaying links to all posts of the same category on the post page
- handling the featured category
- separate posts to have (kind of) 2 blogs?
- create relationship between posts from one category and posts from another category
- Exclude the category of the current post
- Intermittent Gutenberg 504 Gateway Timeout when calling REST route to retrieve categories
- display specific category when website loads
- Excluding current category from sidebar’s post widget, elementor, query-id
- OK to redirect the root WordPress category slug?
- Show subChild categories
- WooCommerce REST API not returning the default products category
- Displaying data from custom fields on a specific category page
- Get WooCommerce product category list in functions.php
- Include a page’s “category” in its URL
- Excluding specific category from custom theme functions
- Using the slug of a custom post category as prefix for the underlying custom post slugs
- Change background image page header overlay for each category
- List non-empty categories from a custom post type
- Creating a linkable category list with post count
- Issue with WordPress category search
- WordPress Category url redirects to subdomain
- Exclude posts with certain tags in category archive
- Loop doesn’t work
- How to add additional field to Add new category part (without plugin use) [closed]
- show category name before first posts in each category
- Need list of child category post titles sorted by child category
- Media Library filter returns undefined function get_current_screen
- Custom built theme won’t filter categories
- get IDs from links categories
- Display all subcategories for a product category in woocommerce
- Narrow Down a Shop Page Results Based on a Product Tag in WooCommerce