Hierarchical list of taxonomy terms associated with current single post

  1. 10sexyapples


    We have the ability to create custom hierarchical taxonomy terms, and this gives us some amazing CMS capabilities, but, I have not been able to find any way to list the terms from a custom taxonomy that is hierarchical on a single post while maintaining the hierarchical structure.

    It would be great if either wp_list_categories ( since this function can already be used to create a list of hierarchical taxonomy terms and provides a link ) included the ability to only list terms assigned to the current post ... or if get_the_terms_list would include the ability to maintain the hierarchical structure the way that wp_list_categories does.

    I'm going nuts at the moment because I have custom hierarchical taxonomies that are up to 4 levels deep, with terms that in many instances only make sense in relation to their parent.

    I need to list the terms assigned to a post in the sidebar on the single view. As is, I can either list ALL terms with a great hierarchical structure, but, no relevance to the current post ( wp_list_categories ), or with great relevance to the current post, but, the list is an incomprehensible mess ( get_the_terms_list ).

    It would be awesome to see one of the above, or both, extended to allow for this capability.

    Posted: 8 years ago #
  2. tighef

    I am looking to do the same thing as well. Would love to be able to list the terms of the current post in a hierarchical form!

    Posted: 8 years ago #
  3. Andy Macaulay-Brook


    Can't you use get_the_category()? Either use it to generate an include list for wp_list_categories() or just to generate your choice of html.


    Posted: 8 years ago #
  4. parfum team

    Thanks, we just resolved the issue with our taxonomy terms through the use of the get_the_category() function. Was look for this solution for a while, thanks.

    Posted: 7 years ago #

RSS feed for this topic


You must log in to post.

  • Rating

    8 Votes
  • Status

    This idea has been implemented