Try this way :
get_categories('hide_empty=0&number=10&parent=".$cat);
For more reference visit this link
Here number represents :
number
(string) The number of categories to return
Related Posts:
- Is There a Difference Between Taxonomies and Categories?
- WooCommerce: List All Categories
- Get rid of WordPress category, tag and author archives?
- Filtering categories in the permalink structure
- get_categories hierarchical order like wp_list_categories – with name, slug & link to edit cat
- Wrap Post count in a span
- wp_nav_menu not appearing for a couple pages
- Why aren’t sub-categories nested after creating post in the WP Admin?
- Preventing index.php?category_name=something from redirecting
- How to get category id of current post?
- Programmatically create product category and add thumbnail in woocommerce
- Trash bin for categories
- Categories’ hierarchy in URL
- Display one category in one page
- How to get next previous category in same taxonomy?
- Show Subcategory Description
- is_archive() content being shown instead of is_category()
- Check is category parent or not from its ID
- Which php file lists all the post of a category
- How to query posts from specific authors and categories using WP_query?
- Apply custom category template to subcategories
- Retrieve all posts within tag OR category?
- Include template before a loop
- How to customize tag and category post listings to show introductory content?
- List Terms in Category
- Can you have a single set of “canonical” categories shared by all blogs?
- List Posts by Category for a Non-Zero, Non-NULL Custom Field Value?
- Include posts from feature category in pre_get_posts
- Rename Default Category (Uncategorized) Via a Function
- How to customize category template?
- Customized landingpages for categories
- get_the_category_list open in parent window
- Show category images on single product page and product overview page
- Class active for Archive link – looped out
- Get parrent category name
- Display specific categories by ID
- Remove sub-menu item from admin menu
- Counter in loop in foreach
- How to add WordPress sub category without select
- Add child category to parent on post creation and save
- wp_list_categories in in nav_menu
- How to use an array of categories as a dropdown?
- ACF add custom fields to categories and display
- Custom taxonomy template for categories
- Show category with link
- How to create a custom categories page
- Select posts from Category
- Get post related on category
- Give Children Unique ID’s
- Searching for a category returns nothing if category is empty
- Need to echo category id in multi-dimensional array
- How to exclude posts from category posts count
- Exclude all subcategories in the_category (post)
- Displaying another main nav menu for specific category
- Exclude categories from list (wp_list_categories)
- How to display the 5 latest post titles but allow only 1 in there of a specific category
- WordPress: Using the category slug get the category ID using mysql query
- Create a Category with a front-end post
- How to add categories using mysql
- Posts made to category don’t show up (do show up on frontpage)
- Exclude category to “the_breadcrumb” functions
- How to fix select filter on category
- wp_dropdown_categories() works correctly but the list is not filtered in admin for custom post type. What is the problem?
- Migrate the posts of a category to another blog as a custom taxonomy
- Woocommerce only display child category when parent is checked (on add new product page)
- Add $args to wp_list_categories
- How to hide a category or tag everywhere EXCEPT for use with get_posts
- Show parent category wp_list_categories wordpress
- Taxonomy custom check box meta field not getting saved
- In if…else condition, the else statement shows even if if statement is correct
- How to show entries related to main category
- Restrict retrieved terms by category?
- Get category from slug list
- Re-coding category-template.php to go to custom URL
- Category removal – Portfolio Category:
- How to Change Sort Order of default WordPress Catgory Widgets?
- Show One Level Category id
- Catch 404 after changing permalink structure from /%postname%/ to /%category%/%postname%/
- Custom filters inside a specific category?
- $args Orderby The number
- Most efficient way to have 1 template for parent, 1 template for child categories?
- Function to list posts from current post’s category fails in WP 3.8
- Multiple parent categories
- Custom fields setup when category selected filter subcategories
- Formating content in category.php
- How to use Greek characters/letters in a query?
- Getting categories to change appropriately when using $cat = ‘ ‘;
- how to call the category of the post
- Category related -> excerpt, title and thumb in sidebar on article page
- How to have a category not show up in query post with page panigation?
- why is the delete option missing from just one category?
- Get all categories
- Show category post order ASC
- How to display all category images for single post in a page?
- How to get specific number of category post on a page or category page?
- Use same wordpress category base and tags as the prefix as the post permalink
- Display different sidebar based on search results from one category
- Adding category to existing post (uploaded file)
- how to create a page that shows all of multiple category posts on a single page
- Quick Edit on taxonomy names results in error