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 do I exclude a custom taxonomy from the post loop
- 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
- Modify main loop in taxonomy archive page
- How can I display all post IDs from the taxonomy?
- Get ID and slug from taxonomy object
- 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 sub categories and their data of a taxonomy
- Advanced Query Logic With Multiple Taxonomies
- Display only first level children of my custom taxonomy categories
- echo current taxonomy id for this loop?
- Is it possible to get all term items from a custom taxonomy regardless of post attachment status?
- 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
- Getting associated taxonomies
- 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
- If Custom Taxonomy
- 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
- Using WP_Query and Query_post for the loop?
- 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?
- How to get name of 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?
- WordPress Taxonomy Menu
- Loop custom post type by taxonomy (Category)
- 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
- Hook to filter based on form value and insert term
- 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
- Querying posts globally based on custom taxonomy with its own taxonomymeta table
- Loop posts without any taxonomy
- How to looping taxonomy terms?
- Foreach for get_the_terms for hierarchical taxonomy don’t repeat Top Level Terms if contains multiple Second Level Terms
- ACF – How to get custom taxonomy term image field
- Grouping posts by 2 different taxonomies