I am trying to get the term children and then check if they exist to display them. But I get no IDs in return of get_term_children command. This is the code:
$children = get_term_children($term->term_id, locations); echo $children;
$term is already defined and outputs well, "locations" taxonomy exists. The code returns me just an "Array" word, no list of child terms shows up.
I've got a similar code in my post archive pages and it works well returning me child categories in n/n/n/n/n format:
$children = get_category_children($this_category->cat_ID); echo $children;
What's wrong with the first code? It should work as well as the second.