you can set the initial value of categories drop down by passing category id to selected parameter of wp_dropdown_categories function as shown in following code :
wp_dropdown_categories( array(
'child_of' => 20,
'selected' => get_cat_ID( 'Bedrooms' )
) );
For more information on this visit this code page.
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
- Woo Framework: woo_cat_featured not populating
- 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
- How to Sync Menu, Widgets and other masters from Main Website to its Sub Site
- A dropdown with checklist
- Wp Dropdown Category Not Show Current As Title
- 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
- Help with SQL query, how to add taxonomie terms with value stored in options?
- add custom option to get_categories dropdown
- Taxonomy for custom post type not found
- Form Value of drop down category + Translation of ‘show option none’
- Get the children of the parent category
- How to remove the term “category” from category pagination?
- Force WordPress to Show Pages Instead of Category
- How do I get the category URL from get_the_category?
- Is there a way to remove categories in bulk?
- Is it possible to put next and previous category links?
- Custom category template pagination problem
- Deleting All tags except categories Wp database
- Getting category before saving post
- How do I change the sql query for wp_get_archive()
- How to put enctype=”multipart/form-data” in categories form?
- What is the advantage of using header-catname.php over is_category(‘catname’);?
- Custom WP_Query for current category (in category.php)?
- Why is get_the_category() saying that I have two categories?
- Custom sidebar on category pages
- Insert Into Sub-child Menu
- How do I get the category slug from wp_dropdown_categories
- Change the category of all posts in it
- Search Posts / Pages with multiple options?
- How to hide some categories in category list under post in wordpress?
- exclude categories from search results
- Read GET parameters in APACHE Mod Rewrite rules for WordPress categories in Posts
- How to categorize posts under Category 1 and Category 2 which are separate lists of categories, and display them as separate lists in widgets
- Creating Category Specific menus
- Category archives with monthly pagination
- How to do some action weekly?
- How to hide child categories from displaying
- How to allow Category Title to use tags?
- Some categories missing on wp-admin/edit-tags.php?taxonomy=category
- Multiple selection for wordpress widget
- How do I retrieve the category ID (ugly permalinks) in my sub-navigation menu?
- function query_posts disabling current_page_menu class
- Using if statement in index.php instead of creating separate template files
- Problem with multiple loops in wordpress theme
- How to get category names in post_class?
- Multiple category columns and post counting list in wordpress Homepage
- wp_insert_link not working
- wp_list_categories : how do I sort by ID when IDs are not sequential
- Showing different posts on category pages
- add current-cat class to single post page
- How to exclude certain categories showing in Gutenberg?
- Problem with pagination block in Gutenberg
- Product category display in tabs
- How to redirect to category page if page does not exists?
- Sort categories by custom field in WordPress admin
- Related to genre and category
- Get permalink to latest post in category
- How to load terms of a custom taxonomy of a product in woocommerce cart page
- Category and tag urls return 404 error
- Removin /page/2 from pagination
- get parent_category class in loop
- Group Posts by First Letter of Title categories
- Display all of a post’s categories except the current category
- Alphabetize all but one category
- How to create a category or tag available exclusively to the admins and not to the users?
- Printing direct descendants of a category with WP_Query
- wordpress category.php query for featured news item, broken pagination and repeating posts
- Listing category
- Query pages by category
- List all authors by matching custom meta data on a category page
- Page view: Sorted by categories
- Anyway to hide a Category in the Categories section when adding/editing a post in WP Admin?
- Showing one post from each category, paged?
- Weird html output of single_cat_title – is not inside of the html element?
- How to add custom prefix before category base for category page URL?