Two things!
1) Don’t use query_posts()! Instead, for situations like this, use the pre_get_posts action to modify the query.
2) I don’t think you actually want to be using a loop here at all (so neither query_posts() nor pre_get_posts or even WP_Query). Rather, I think you’re looking for wp_list_categories. In your template, you’d probably do something like this (untested):
<?php
// the taxonomy archive term page's term id
$queried_object = get_queried_object();
$term_id = $queried_object->term_id;
$list_child_terms_args = array(
'taxonomy' => 'YOUR_CUSTOM_TAXONOMY_SLUG_HERE',
'use_desc_for_title' => 0, // best practice: don't use title attributes ever
'child_of' => $term_id // show only child terms of the current page's
);
?>
<ul>
<?php wp_list_categories( $list_child_terms_args ); ?>
</ul>
Related Posts:
- Should I use custom taxonomy or custom post type
- Filtering a custom post type by custom taxonomy in archive template
- Exclude a category from WP_Query
- How to build a complex page structure
- How to filter custom post types by custom category taxonomy
- Is there a way to use regular categories with custom post types?
- How to list all categories and tags in a page?
- remove support for ‘Categories’ for a custom post type
- Child pages on hierarchical Custom Post Types 404s
- Glossary with Custom Post Type
- How to check if last uri segment is a custom post type or taxonomy term?
- Filter get_categories() for taxonomy term in WordPress
- Custom permalinks – post type – hierarchical taxonomy’s
- Getting taxonomy terms used by custom post type
- Taxonomy list. Order by a specific custom post type count
- Custom Taxonomies: Multiple Hierarchical Permailnks For A Single Post + Prev/Next Links
- How to show custom taxonomy in the permalink?
- Custom/separate categories for custom post type
- Hierarchical Custom Post Types or Similar
- Display Custom Category (taxonomy) Name in Custom Post Type
- Display types of posts in edit.php instead of All, Published, Scheduled and Draft
- Show Post Count of a Category
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- Custom Post Type with two hierarchical Custom Taxonomies: strategy to generate best permalink structure
- Automatically populate a hierarchical taxonomy from a custom field
- Get categories and descriptions from custom post type
- Custom Taxonomy – Tags Metabox is showing instead of Categories
- Combining custom post type and post category
- How to create new category for custom post type?
- Insert HTML inside link in a walker
- Custom Post Types and independent Categories – complex Taxonomy
- Set menu active state for custom posttype and category, given custom taxonomy term
- Display all posts in main category and 1 subcategory
- Custom Post Type Archive Page Filtering
- How can I auto-assign a CPT post to category in a custom taxonomy when published?
- Custom Post Type / Two level deep taxonomy (cat. and subcat.) uri problem (error 404)
- Custom Post Type With Categories
- get_category_parents for custom post type taxonomy
- wp_list_categories() – current-cat class also inside posts?
- Categories of custom taxonomy don’t show any posts
- How to display custom taxonomies with links in filter menu?
- Cannot add category or custom taxonomy from admin. WordPress site is hosted in Windows 16 server via IIS. No XAMPP or WAMP
- How to create custom url structure based on custom post type rewrite slug, taxonomy and category slug?
- Hide parent categories when clicked, and show it’s childs
- Limit amount of posts made within a custom taxonomy
- Can’t remove front from permalinks for custom taxonomy category page
- How to get custom posts sub category link
- Custom while loop for hierarchical display of a taxonomy
- browse by category and tags?
- Create more category hierarchical depth for custom post type/taxonomy plugin (widget)
- List of Posts and Categories
- Create a permalink structure with custom taxonomies and custom post types gives 404
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- in_category for custom post types
- Get parent category id from child category page for custom taxonomy
- Custom Post type & Taxonomy 404
- How to add current custom taxonomy slug to body class
- List Posts By Custom Taxonomy
- get_category_link() for custom post type does not include custom slug rewrite?
- How to Display Posts From Category Within a Custom Taxonomy?
- Disable custom taxonomy on admin bar
- Listing all slugs?
- category list with cutom post count
- The Difference Between Categories and Tags and Taxonomies and Terms
- Creating a non-hierarchical Taxonomy that behaves like categories
- Migrating Hierarchal Taxonomy Categories Between Post Types
- Ideas on how to organize a project [closed]
- Get child categories of custom taxonomy category?
- How should I structure complex content hierarchies?
- Displaying One Custom Post Type’s Content On Single Post of Another Custom Post Type
- Custom post types category
- Get terms for a specfic post from multiple taxonomies in custom post type
- how to organize my categories or should I do custom post types for some?
- Advanced archive url structure (category, tag and date)
- How to divide Subcategories into pages of parent category wordpress
- Custom front-end form for adding post – Category problem
- How to show related posts of category on post within custom posttype
- Show Custom Post Type based on Category on Archive Page
- Set a Default CPT taxonomy by taxonomy id
- How to manage a dynamic multi-level page hierearchy system?
- Categories manage
- Custom category taxonomy – archive page not showing up
- Create a Hierarchical List of Custom Taxonomies AND Posts
- Help with Travel Guide Setup
- Custom post type category archive URL redirects to home page
- Help with Multi Level Category Archive Page
- Custom Post Type categories at edit post not hierarchical
- How can I add a “fake” parent into the permalink?
- Organizing The Custom Post Type with Taxonomies / Parent Posts
- Display 2nd category, only once, as sub-heading, in the loop
- Get a list of categories ids
- Custom taxonomy archive not showing posts of certain child taxonomies
- Display a custom post type list by taxonomy term
- Return Custom Post Type Categories
- Remove slug from Custom Category Permalink + dual-category permalinks
- Highlight specific menu item when custom post is page
- How to add categories to a custom post type using wp_insert_post($new_post);
- How to get the proper category in permalink with custom post type assigned to multiple categories
- List all posts in hierarchy and groupped by each taxonomy