You are so very close here, you can almost smell it. Here is how you would complete your code:
You already have all your child terms stored in an array called $children
. To display these, you simply need a foreach
loop. Something like this will do the trick. (You can just extend on this, simply do a var_dump
or print_r
to get the available objects you can use)
foreach ( $children as $child ) {
echo $child->name; //very basic, display term name
}
If you need to get a link to the term, make use get_term_link
Related Posts:
- Get the the top-level parent of a custom taxonomy term
- get_terms – only top level
- Custom taxonomy terms not showing as list Gutenberg Editor
- How do I get the top-level terms in a custom taxonomy?
- Order get_terms using a Custom Field
- Using pre_get_posts to rewrite search query to display posts from multiple taxonomies
- How to modify the query in taxonomy-custom.php to sort term archives by a custom meta field?
- wp_options table value
- Custom Taxonomy Meta Admin Column
- Custom Taxonomy Only Showing Top Level Terms in Admin?
- How to assign default taxonomy to pages on ‘save_post’?
- Which template name to use for taxonomies but not their terms?
- Count number of post in Taxonomy?
- wp_query orderby title and meta key value (WP3.1)
- custom taxonomies on permalink
- Manipulating cookie on specific taxonomy archive page
- Landing in 404 Page on Navigating to Custom Taxonomy Archive
- Get main term from a sub term in Woocommerce
- Create Admin Only Taxonomies?
- Category page and edit post page with this category very slow
- Custom Taxonomy tree view not showing correctly in backend
- Add parent/child taxonomy to custom post type url
- How to List Parent Term Links for Custom Taxonomy With & Without Children?
- Correct Way To Show Custom Taxonomy for Image Attachments on Template File
- Query Posts by taxonomy/Taxonomy Child Custom order
- Single reusable value for post meta: Custom Taxonomy or Post Meta?
- 404 for a custom taxonomy?
- How to display featured images for all posts with certain taxonomy label?
- List taxonomies in a dropdown in theme’s option panel
- Create multiple rewrite endpoints for custom taxonomy archive
- Get child product categories from parent product category in WooCommerce
- Adding Age Based WordPress Category
- Display only first level children of my custom taxonomy categories
- Register Taxonomy earlier so it can be used in functions.php and admin-ajax.php
- echo current taxonomy id for this loop?
- Display the description of taxonomy terms
- Add “All Posts” button to custom post taxonomy filter with ajax in wordpress
- get_terms adds slaces to the resualt
- How to display custom taxonomy images on index.php?
- Meta query for a custom taxonomy on attachment
- Meta description – template code to get category description
- Posts in loop displaying all taxonomies
- Get number of post who belongs in two taxonomies!
- Custom Taxonomy in REST API
- Retrieving an intersection of two terms from two different custom taxonomies via API
- WordPress thinks my custom taxonomy pages are search pages #seo
- how to change permalinks format for pagination?
- Getting WooCommerce product related child categories
- How to dropdown custom taxonomy?
- Sorting main query by custom taxonomy slug
- Creating conditional to display taxonomy term meta
- Custom Taxonomies and parents
- List of Registered Taxonomies of Current Post
- How do I display a custom field from a custom taxonomy in single.php?
- My taxonomy won’t be registered. Can’t see it in my back-end
- Avoid taxonomy-%term%.php if more than one taxonomy
- How to customize taxonomy archive template files for subterms?
- get_the_tags Conditional display of a custom taxonomy
- Proper use of wp_get_object_terms
- Permalink Problems
- Get Terms for Page
- Output all terms in a custom taxonomy and add a “active” class only to the ones attached to the current post
- How can I change the output display of my pagination?
- Hide custom Woocommerce taxonomies when empty
- forward/redirect taxonomy archive of term to a page with same name
- How to add a date creation field when a custom taxonomy relationship is created?
- List custom taxonomies associated to an author’s posts
- Show related posts on single.php, grouped by taxonomy terms, with Advanced Custom Field post object selected
- Singular custom taxonomy label
- Get Posts Related to Category By category id or slug
- How to add a dynamic dropdown derived from custom taxonomy
- Tree view wp-admin terms
- Retrieve the child terms by having the parent’s information
- Order get_terms by count using a custom taxonomy hierarchy
- How to add chained dropdown filter to a wordpress website
- custom taxonomy not showing up after adding capabilities upon updating to WP 5.1.1
- Change the Page Title of the Archive Page for Portfolio Tags
- Is it possible to sort the post based on a custom field?
- Why get_terms() behaves strangely when being called in admin (for use in meta box)?
- qtranslate-x problem with custom term description
- Custom Tax Archive of Parents Only?
- WordPress shortcode Issue!
- Switching from catalog to product category/subcategory
- ‘Post_tag’ taxonomy tags don’t link to existing posts in CMS
- Sorting terms individually for each post
- Looking for suggestions on creating simple database (Help!!)
- Extra fields on categories that is available via the WP-API?
- Tax Query not working
- Taxonomy archive page have no post
- Display list of custom taxonomies from a custom post type ordered by their parent
- WordPress hiding posts without content on custom taxonomy query. How to solve?
- get meta fields and taxonomy of any post type
- Custom taxonomy – query returns an error
- Getting grandchildren of a post with a specified custom taxonomy?
- Taxonomy Parameters in WP Query to get posts from two different taxonomies
- Update fields with post object and custom tax with wp_insert_post
- how to import custom taxonomy (& terms)
- Can you orderby slug in a taxonomy archive page using WP_Query?
- Getting taxonomies specific to categories
- Search and filter with custom field in taxonomy