Problem is solved.
Just need to add 'hide_empty' => false,
to the array.
Like this :
wp_dropdown_categories(
array (
'orderby' => 'name',
// ID of the already selected category:
'selected' => 4,
'hide_empty' => false,
// If no category is selected:
'show_option_none' => 'Choose one'
)
);
Related Posts:
- Get category ID from category slug (not working)
- How do I remove “Uncategorized” from posts with more than 1 category?
- Remove parent category from permalink? Basically only have the child category?
- Control term order on a per-post basis
- Filter by post category in Media Library
- Changing Top Level Items into Radio Buttons in the Categories Meta Box?
- Custom post types with their own permalink structure
- Display all posts in category, with specific tag posts at top
- How to create a widgetized sidebar for every category dynamically?
- Send an email when custom post type category is changed
- Display the deepest child category from Category X (in loop)
- When using get_categories or similar, is it possible to filter results that contain certain Tags as well?
- Exclude subcategories from the url
- Why adding Categories does not auto refresh in Backend while using my custom theme?
- Select category in custom query
- Removed slug from CPT, now How/where do I hook the filter to the taxonomy term archive pages link?
- Remove specific category from a post
- Search by word, category, tag, author
- How to hide certain categories in wordpress dashboard?
- How to filter archives both by category and tag?
- Resolved – category-slug.php not working after wordpress migration
- How to retain the values from dropdown category lists after wrong form submission?
- How i can let users add notes to my posts
- Woocommerce – Get product category 2nd level category
- Hide post meta data on a specific category
- How can I get an tag to wrap each ancestor that gets outputted in this condition?
- How to prevent empty category to list content of sub categories?
- Single_cat_title() print the title before text
- Sort posts by post_type in category.php template
- Why would in_category only return one post in a specific category?
- Is it possible to have WordPress not recognize category URLs?
- Disallow categories from this MySQL query
- Use a wordpress page to display a certain category
- getting content from main domain to sub-domain using category and WP_Query
- editing fonts of category links from the_category() funtion
- Force a user’s posts category
- How to list child categories?
- how to define category loop last class in the third
- Making the category & tag Description textarea bigger
- WordPress admin categories sort show is wrong
- Huge category CSV import does not work
- Needing a snippet for listing category specific tags
- Displaying Categories and Sub Categories
- Change thumbnail image depending product category
- How to list categories within tags?
- get_next_post set the category
- WordPress URL Rewrite for dynamic and customized URL
- Different menu navigation per category
- category doesn’t showing up in admin
- Show matching categories in search page
- How to hide category name
- Get category URL knowing it’s id
- Keyword search in multiple categories
- Targeting Parent Category Pages
- Change every post background based on category
- How could I know all the categories from post?
- How to make subcategory for custom post and and display?
- Get category’s parent category while using get_the_category_list
- Displaying list of subcategories and not parent category
- Linking doctors posts to specific services for a medical practice
- How to show the category of custom taxonomy
- Show testimonials based on post category matching product name
- WordPress list categories dropdown with parent-child relation and child under it’s parent
- Remove parent category from child/sub-category page URL in WordPress
- Showing HTML if Post is In Certain Taxonomy Term
- Add code to header based on category for specific posts?
- How to only show parent categories in sidebar
- Can I prioritize post categories for choice for breadcrumb trail?
- Displaying a custom field in Category Archives
- Category List with custom urls
- Custom Portfolio Page
- Custom Fields Value As Taxonomy
- Load the last post of a category
- create function to call category name and slug
- Redirect Problems with Archive Page and GET variables
- Disable Category Taxonomy
- How do you get sticky posts to work with categories?
- A different permalink structure for different categories
- How to make product image inherit from category image
- Is it possible to set up blog categories without changing permalink structure
- How to display categories image in loop homepage WordPress
- Display the articles of a category by role
- How to “remove” WordPress categories UL and make the list loop in a horizontal line?
- How do I rewrite a single category link to point to a custom page?
- Add subcategories posts to the counts column at the admin’s categories list
- Default category isn’t saved in database
- Display one post on category.php: Wrong featured image
- Display related posts with same category or same tag return blank
- Get posts from 2 or more categories
- Category foreach Paging
- date.php shows all posts. how to fix it?
- Help with Wp + Mixitup code
- How can I get this code to only output one link?
- Matching usermeta at registration to categories of content
- How do I hide posts in a category from all listings but still allow the posts to be viewed?
- How to get Woocomerce categories count
- show posts from some category and sort by advance custom field
- How to show monthly archive posts?
- how do I exclude a category foreach
- CPT Custom post type Tags & Categories not showing for ‘Editor’ user in editor