You can use wp_list_categories
to achieve that:
<ul>
<?php
wp_list_categories( array(
'child_of' => <PARENT_ID>, // show only children of PARENT_ID
'childless' => true, // show only categories without children
'hide_empty' => true, // should empty categories be hidden
) );
?>
</ul>
You can find full list of available params here:
https://developer.wordpress.org/reference/classes/wp_term_query/__construct/#parameters
Related Posts:
- How do I append lists in Prolog?
- Inorder Binary Tree Traversal (using Python)
- How to have a set of sets in Python?
- Learning Haskell: How to remove an item from a List in Haskell
- How to obtain a subarray in python 3
- Reversing a List in Prolog
- List Length in Prolog
- Editing a Post, 99% CPU?
- Similar posts formatting
- Introductory paragraph only in list of blog posts
- List all categories in options
- WooCommerce Grid / List view
- custom walker wp menu last element
- How to divide and display categories into two columns
- List first letter of categories – issue upon spcecial characters (danish letters)
- How do I create an alphabetically organized glossary of links?
- Generate a nested list of all posts, sorted first by year, then by month
- adding a #hash to each link in list_pages()?
- How correct list-style displayed in firefox? [closed]
- Output categories in something different than a list
- Wrap Meta Box with and for each new line
- get_all_category_ids for bookmark
- Add thumbnails in ‘li’ list
- List child pages alphabetically
- How to make a text string into a bullet list [closed]
- Python – TypeError: ‘int’ object is not iterable
- IndexError: list index out of range and python
- Finding the index of an item in a list
- Convert list to array in Java [duplicate]
- What does the list() function do in Python?
- Why does this iterative list-growing code give IndexError: list assignment index out of range?
- How to avoid “RuntimeError: dictionary changed size during iteration” error?
- How do I concatenate two lists in Python?
- How can I randomly select an item from a list?
- Fastest way to check if a value exists in a list
- How can I count the occurrences of a list item?
- Get list from pandas dataframe column or row?
- How can I compare two lists in python and return matches
- Pointer to incomplete class type is not allowed
- How do I check if a list is empty?
- TypeError: list indices must be integers, not float
- Python Sets vs Lists
- AttributeError: ‘list’ object has no attribute ‘replace’ when trying to remove character
- Whats the difference between ‘for x in list:’ and ‘for x in list[:]:’
- Python (2.x) list / sublist selection -1 weirdness
- lists and arrays in VBA
- how to create a list of lists
- Python assigning multiple variables to same value? list behavior
- How can I remove all instances of an element from a list in Python?
- Create an empty list in Python with certain size
- What’s the difference between lists enclosed by square brackets and parentheses in Python?
- Appending to a list gives ‘int’ object has no attribute ‘append’
- finding the maximum length of lists in c#
- How to split() a delimited string to a List
- creating a reverse method for a python list from scratch
- In Python, is there an elegant way to print a list in a custom format without explicit looping?
- R: Print list to a text file
- Writing Python lists to columns in csv
- convert string to arraylist
in java - How do I clone a generic list in C#?
- How to show a hierarchical terms list?
- Listing pages which uses specific template [duplicate]
- Archive list with only years and months
- List latest posts in WP-Admin
- Changing a function in function.php to a shortcode – for listing categories of only a certain post type
- Display only one result from “get_the_category_list”
- Show template loaded
- TinyMCE – Add class to OL – selector doesn’t seem to get parent OL,UL, just LI’s (4.6.3)
- how to change appearence of the content of default post list columns?
- How do I apply a class to custom menu items based on user roles
- Excluding Pages not working
- Exclude admin from user list
- Can I wrap an unordered list inside a shortcode?
- wp_get_archives() display months even if there is no posts
- How to link the whole list item in Gutenberg’s latest posts block?
- How do you List all Sidebars in a Metabox
- Limit checklist by the current user
- Conditionals if tags exist?
- How do you change the comment count in the back end posts list, to reflect unapproved comments, rather than all comments?
- show posts under subcategory only when in that subcategory
- get listed category’s id?
- Convert UL to dropdown list not working
- How to show a list of only categories (exclude subcategories)
- Category list with postcount
- Output custom text field as unordered list
- Pagination in html table is not working
- Divide the list into two columns (get_posts)
- get taxonomy list in a page in the wordpress
- How Can Hide Define Category in Post Contents?
- add links to list of post terms
- List a custom post type’s posts ordered by nested custom taxonomy
- Listing category
- List products from current category
- How to add a box for list items?
- How to create a page that lists custom taxonomies with links?
- Display all posts from selected month
- How to display my categories in a list (to a post, not the sidebar)?
- ACF Plugin WP with list-group – Vimeo [closed]
- How to save the results of a query as a php file for an autocomplete search bar