WordPress.org

Ready to get started?Download WordPress

Ideas

Hierarchical list of taxonomy terms associated with current single post

  1. 10sexyapples
    Member

    12345

    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: 4 years ago #
  2. tighef
    Member

    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: 4 years ago #
  3. Andy Macaulay-Brook
    Member

    12345

    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.

    http://codex.wordpress.org/Function_Reference/get_the_category

    Posted: 4 years ago #
  4. parfum team
    Member

    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: 3 years ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    8 Votes
  • Status

    This idea has been implemented