Get Custom Category from Single Custom Post Type


foreach ( $terms as $term )
{// this gets the parent of the current post taxonomy
if ($term->parent == 0)
{$myparent = $term;}
}
echo ' '.$myparent->name.'';
// Right, the parent is set, now let's get the children
foreach ( $terms as $term ) {
// this ignores the parent of the current post taxonomy
if ($term->parent != 0)
{
// this gets the children of the current post taxonomy
$child_term = $term;
//print_r($child_term);
echo ' / '.$child_term->name.'';
}
}

?>