Solved

Display child terms - taxonomy

Posted on 2011-09-27
1
175 Views
Last Modified: 2012-08-14
Hey,

I am using this code below:

$terms_as_text = get_the_term_list( $post->ID, 'eventcategories', '', ', ', '' ) ;
echo strip_tags($terms_as_text);

Open in new window


But I have this structure:

Alpine
   Sugarloaf
   Sunday River

I would like it to only display the children. And I have seen get_ the_children(), but I need this to be display inside a loop to display that instance.

Thanks
0
Comment
1 Comment
 
LVL 31

Accepted Solution

by:
gwkg earned 500 total points
ID: 36713496
How about

<?php get_term_children( $term, $taxonomy ) ?>

http://codex.wordpress.org/Function_Reference/get_term_children
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now