I did! Write this codes in functions.php
add_filter( 'widget_categories_args', 'force_widget_cat_args' );
function force_widget_cat_args($cat_args) {
$cat_args['hierarchical'] = 0;
return $cat_args;
}
Related Posts:
- Using wp_category_checklist in a widget
- How to remove the parentheses from the category widget
- How to create a widgetized sidebar for every category dynamically?
- Customizing Default Categories Widget
- Display all posts with same title
- I want to create a posts widget and be able to select categories
- How to have Multiple Archives Widgets, one archive widget per category (in a different page)?
- Categories lose hierarchy order once assigned to post
- Add Icons to the Product Category Sidebar Widget WooCommerce
- How to display widgets inside a page content without a plugin?
- How do you categorize pages?
- WordPress category widget only show categories with children
- Customize WordPress widget – Product Category
- Post Count for Categories, however not to calculate a total
- How do I make the category sidebar widget (stock) display the total # of posts including those in subcategories?
- Categories widget show empty?
- Is it possible to remove from default category widget?
- how to remove the default title of Categories widget
- How to show 5 posts from specific category on related page?
- display a widget on specific category and its sub categories
- Multiple selection for wordpress widget
- How to not display subcategories in Recent Posts widget area?
- How to Sync Menu, Widgets and other masters from Main Website to its Sub Site
- Tags Instead of Category
- How to hide widget from certain category
- Last x Posted Categories?
- WordPress category filters as subcategories
- exclude certain categories form archive widget
- Conditional widget for theme template file
- Add filter for specific category only
- Exclude a category from block editor’s category widget
- How can I display the category name in the single post when using WP Blog and Widget?
- How to Change Sort Order of default WordPress Catgory Widgets?
- How to add an “All” category to the tag cloud?
- Custom file with special code of category widget
- in_category(‘category-sluga’) returns true for Archive page of Category ‘category-slugb’
- Problem with single posts not showing correct category sidebar
- single category widget with conditional terms
- Customize category query in widget
- is_category() function
- Create terms when registering taxonomy?
- Include custom post types in categories widget
- How do I edit pre_get_post for the category the user is currently in?
- Remove “Category Archives: title” at the top of a category page [duplicate]
- Category Alphabet List Broken
- Display only one result from “get_the_category_list”
- Display empty taxonomy terms with get_terms()
- Assign an icon to a category post
- How can I show the subcategories content on the parent category page?
- Custom Category/Subcategory structure
- Category archive page – loop through posts of certain tag (with pagination) – pre_get_posts
- Format Brand value in Category view [closed]
- Remove ‘rel’ attributes from the_category() output
- Default category link for a custom category is a broken link
- 3 Columns, 3 Categories, One Archive, and Pagination
- Possible to make a subdirectory that loops through a single category?
- Archives for each category on WP Multisite
- Update post title with category name after editing a category
- Automatically set default password to all posts in a specific category
- Warn me about ‘uncategorized’ posts
- Categories showing page not found
- Send to different single pages by category when multiple categories exist
- How can you change the permalink for pages?
- How to select category on if function
- how to wordpress When I click on the category link, subcategories appear
- woocommerce related products by specific categories [closed]
- Problem with different query loops (and “main loop”) on category template page!
- Show posts in “image” format when viewed in category page, but with comments in blog
- Change the name Category – Not change category name
- How to change the order of the subcategory and category in a post?
- Properly setting up a feed
- Why get_category() function is not working not working when embedded in a page?
- How to link a PDF file to a category URL
- How to schedule categories?
- Template for product-category page [closed]
- Copy post taxonomy?
- Change Default Content when Creating a Post based on Previous Category Choice
- Display category and associated post listings
- How to get sub-categories to display same look as there parents
- Combining these queries? (Same taxonomy term + same category as post)
- get_object_term_cache duplicate terms after update to wordpress 6
- Ignore the Ad on Specific Categories
- Sidebar by Category Conditional Statement not functioning
- Style post archive blog preview based on category
- Change the full slug for a specific category?
- Loop by category and meta_key
- Customizing the output of the archive and category widget without altering the original behavior of the widget
- Hiding by default posts in given category except for some cases
- Making my category headers smaller
- How to display get_categories selected category?
- the_category if/else statement
- Link to a latest news item with correct url
- exclude parents from the_terms
- Problems with explode [closed]
- Assign a category by user and customize the edit-tags.php?taxonomy=category page
- comments_number fails to print
- Sorting Woocommerce products by category and attributes
- How to show child category name & post from it’s parent [closed]
- Open everything in new tab
- sub-category showing up in wrong order in breadcrumbs