In my custom post type (portfolio_pt) I have some hierarchical category structure something like that:
ParentCat
|-child
|-someItem
ParentCat2
|-cild
...
When I try to get list of all terms by get_the_terms function for "someItem" post this function return only last category ("Child Cat" without "Parent Cat") example:
global $post;
$terms = get_the_terms( $post->ID, 'portfolio_pt_category' );
I try to use get_the_term_list function but effect is the same, it returns only last category.
Thanks for help!
$terms
?Array ( [9] => stdClass Object ( [term_id] => 9 [name] => Webdesign [slug] => webdesign [term_group] => 0 [term_taxonomy_id] => 9 [taxonomy] => portfolio_pt_category [description] => with Parent [parent] => 27 [count] => 7 [object_id] => 632 [filter] => raw ) )