Well I did it..
<ul id="filter">
<li><a href="#" class="current" data-filter="*" title="">*</a></li>
<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?>
<?php
$term_id = $term->term_id;
$taxonomy_name="categories";
$termchildren = get_term_children( $term_id, $taxonomy_name );
foreach ( $termchildren as $child ) {
$term = get_term_by( 'id', $child, $taxonomy_name );
echo '<li><a href="#" data-filter=".' . $term->slug . '">' . $term->name . '</a></li>';
}
?>
</ul>
Related Posts:
- How to add images to taxonomies?
- Display category posts grouped by taxonomy
- Custom Taxonomy and Tax_Query
- How to modify the query in taxonomy-custom.php to sort term archives by a custom meta field?
- display posts with same taxonomy term
- Including all terms in wordpress tax_query
- Display one post from each term in a custom taxonomy [closed]
- SQL QUERY needed to get POST category (taxonomy) ? – MUST be SQL statement
- Is it possible to sort the post based on a custom field?
- Looping Through Custom Tax Terms and Displaying All Posts For Each
- Group posts that matches a term in a loop
- Custom taxonomy template loop
- Combine multiple custom user taxonomy in single url
- Advanced Tax Query
- How to handle “the_terms” inside loop
- Improving WP_Query performance for multiple taxonomies
- Taxonomy , subtaxonomy,child taxonomy of a product woocommerce
- How to display custom taxonomy in multiple columns?
- Custom taxonomies making WP very slow – Way to fix?
- How to count the number of terms in a taxonomy
- All posts are still shown when adding category argument to query
- Sorting taxonomy columns by meta value numeric
- Operations with custom fields values in a loop
- Get Taxonmy Term ID For Current Post
- Display only first level children of my custom taxonomy categories
- echo current taxonomy id for this loop?
- How do I Use Multiple Loops with WP_Query?
- How to adjust code to refresh a dropdown box with tags that are active on filtered category listing
- Changing stylesheet depending on custom taxonomy terms
- How can marge these loop code?
- How do I display a list of posts under all hierarchical children of the current taxonomy?
- How do I taxonomy terms based on terms they are used alongside?
- Custom taxonomy [year] is directing to yearly archive
- Get posts by term slug only
- Posts in loop displaying all taxonomies
- Taxonomies on custom taxonomies
- Add Custom Taxonomy for Blog Meta Info
- WordPress Tag or Custom Taxonomy Return All Posts if has that Word in Post Title
- WordPress query with items from more than one selfdefined taxonomy as `term` argument
- Search Tool only refreshes Page without showing results
- where is the 4th taxonomy terms? taxonomy terms is disaapearing in the loop
- How to fetch the data from Advanced Custom post when we search specific keyword or field name related to the post?
- Display all posts that use a custom taxonomy
- Custom taxonomy.php not working
- How can I reduce amount of ifs and else ifs in this specific block of code?
- Returning One custom taxonomy term name
- How to add images to taxonomy terms? [duplicate]
- Exclude taxonomy term from all loops, but having it on widget
- one post per term taxonomy
- Custom arguments in WP_Query
- check if a taxnomy queried in $wp_query?
- WP_Query tax_query – Show results if child has parent X
- Query custom taxonomy for category including children
- List terms of custom taxonomy if matches other taxonomy
- Variable Not Working Inside is_author() Array
- Only display latest custom taxonomy post
- how to get the post id in the option tag
- How to get the term description in a taxonomy term archive query?
- Chaining Taxonomy Queries
- Prioritise Pages over Taxonomy Term Root Archive, but not Taxonomy Term Child Archives
- Tracking the name of a custom taxonomy
- Add terms to a taxonomy archive from within the same taxonomy
- How to add a shortcode function that returns the taxonomy slug of the actual post within the loop
- Is it possible to filter a taxonomy archive by other taxonomies that are on posts?
- Fill New Taxonomies
- Group posts in a category based on tags in custom taxonomy
- Custom Taxonomies Archive Page 404
- How to loop custom posts that have an exact match in taxonomy terms?
- WordPress taxonomy terms archive template help
- Get post meta value outside of the loop
- ACF – Get unique values of array
- Remove Custom metabox from particular page template is used
- Custom taxonomy shows full articles
- Is it possible to sort the post based on a custom field?
- Output slugs to use as class names for every taxonomy a post is attached to
- Make relation of custom taxomies
- Multi level archive
- taxonomy query on front page
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- sort Posts by custom user filed
- How do you search for a post by custom taxonomy?
- Query pages by child term
- Next/Previous links in custom taxonomy, where item may belong to multiple terms
- How to query authors by custom taxonomy?
- Query Number of Loaded Posts in Loop
- Trying to achieve row posts below category with multiple loops in custom tax
- Adding a query var to taxonomy term archive – gets redirected to the other taxonomy archive page
- Custom Taxonomy + JQuery Tabs
- WordPress show posts from children terms of a taxonomy term
- How to get multiple Taxonomies not All Taxonomies?
- Primary Taxonomy for Post
- Get custom taxonomy value of post and output posts in same taxonomy
- Get taxonomy image for Toolset custom taxonomy through Toolset Views Shortcode
- wp_get_object_terms count on taxonomies within an category archive
- List posts grouped by children of a custom taxonomy
- Make custom post type display with custom taxonomy in url
- How do I create a term for every value of a post meta?
- How home my code doesn’t display any feature image? Looping through post from a taxonomy and not getting feature images back
- Complex Taxonomy scheme
- Loop posts without any taxonomy