$term_id = 2; // use get_queried_object()->term_id; to get the current term id
$taxonomy_name="mypages"; // use use get_queried_object()->taxonomy; to get the current taxonomy name
$countchildren = count (get_term_children( $term_id, $taxonomy_name ));
echo $countchildren;
Related Posts:
- get_categories for custom post type with a specific custom taxonomy attached
- How can I add the featured image functionality to a custom taxonomy?
- Combine two taxonomies in a hierarchical tree
- How can I select a primary category?
- How to make custom taxonomy check boxes like ‘Categories’
- How to create non-unique sub-category slugs?
- How to get next previous category in same taxonomy?
- Getting WordPress custom taxonomy/category?
- Display empty taxonomy terms with get_terms()
- How can I convert some categories to a custom taxonomy?
- Get multidimensional array that reflects category hierarchy
- Change existing taxonomy settings when using custom taxonomy
- How to get the id from the custom category?
- How can I edit the ‘Most Used’ tab in the categories meta-box to show another custom taxonomy?
- Get Number of total Parent Categories for Custom Taxonomy
- Display custom taxonomy attached to the post on post single page
- Question on using custom structures for categories
- Echo text using is_tag
- Same menu for different taxonomies to reach different content
- Change categories count to include media attachments
- How could I write a get_categories_by_year() function?
- How to get posts using category slug in ClassiPress?
- How to set the same base url for two different taxonomies?
- Get WooCommerce product category list in functions.php
- Why use hierarchical taxonomies instead of many custom taxonomies?
- Renaming default category taxonomy?
- How to Manage and link certain custom taxonomy?
- Display List of Categories Within a Custom Taxonomy
- How to add a post with new Taxonomy without assigning to default category?
- Converting Categories (with ACF fields) to custom taxonomies
- How to display non-hierarchical taxonomy as terms with checkboxes?
- How can I list all the categories under a Custom Post Type (taxonomy)?
- Use tag interface for hierarchical taxonomy?
- Using URL parameters, list posts from category and custom taxonomy
- Different templates for parent and children categories/taxonomies
- Are Categories, Tags and Custom Taxonomies any different in regards to SEO?
- How to Override default update_count_callback for category
- Add custom taxonomy terms to WordPress menu dynamically & append #slug to url
- Custom post type taxonomy template
- How do I count how many top level categories there are?
- Order Taxonomy Term by date created
- Any way to assign Post Categories and Tags to Links?
- Display name of the last child category
- How to export/import categories and keep their IDs?
- How to use wp_category_checklist()?
- wp_dropdown_categories and custom taxonomy + custom post type
- Get all sub-categories of a parent category
- How to view WordPress’ default category IDs?
- Random taxonomy category list
- Specifying multiple categories in URL (permalink)?
- Should the actual /category/ directory be 404? Is that normal WP behaviour
- Warning: sizeof (): Parameter must be an array or an object that implements Countable, On products pages
- Limit number of terms that a custom taxonomy can save per custom post type
- Display Taxonomy Terms in an option tag with value being the slug
- category filter doesn’t work in WPML
- One Specific Category To Permalink
- There any way to get de percentage of number of post by user and category?
- Get Posts Under Custom Taxonomy
- Filtering *out* a taxonomy from the admin post list
- category image taxonomy
- Categories overview that links to page displaying posts
- How can I improve this taxonomy treating approach?
- Limit categories and it’s subcategories for specific group of users
- Ive got a term (get_term_by) but now I want to filter it by a category it is in?
- How to display parents category and child category separately for a specific post?
- Admin: Navigation Menus do not show empty categories/taxonomies in the list’s search tab
- Get Categories Where Taxonomy Equals ‘n’
- Having a template per category? Bad for server overhead?
- How to display a value inside a post with a specified category from a category custom field? [closed]
- Grandchild Term Things Grandfather Term is It’s Parent
- Get posts of a custom post type from category from taxonomy?
- Get posts in a subcategory of a chosen parent
- Natural sort / ordering wp_dropdown_categories
- Best way to categorize/populate a magazine style layout
- Displaying posts of given category
- Show the number of the post
- Automatically adding tags and categories into Post Excerpt for searching
- How can i add service category here? [duplicate]
- Show subChild categories
- List taxonomy terms assigned to a post in hierarchical view
- WordPress 5.4 and higher: Filter posts by category 1 AND category 2 in API requests
- Automatically add custom taxonomy to posts in a category
- Ordering terms whilst in loop
- Limit categories to hierarchal depth of 2
- Count how many posts have a specified tag AND category
- Show the parent taxonomy by creating shortcode in woocommerce?
- When creating a new product, auto assign it to all custom taxonomy woocommerce
- WordPress Portofolio Conditional Templating – functions php
- Parent Category and Subcategory default text generated with category
- Post List by category and under custom taxonomy
- Create duplicate category page with content variations
- Most efficient way to display current post subcategories?
- How to add additional field to Add new category part (without plugin use) [closed]
- Category and tags goes 404
- How to create default categories in new installs?
- Check if value is a custom taxonomy category name
- Problem importing categories and sub-categories
- finding out the top 5 source ( source is a custom taxonomy ), in a given category
- Show parent-child relationship for categories in the wordpress admin
- Order Categories by Character Count