Forums

[resolved] Hierarchical list of taxonomy terms associated with current single post (4 posts)

  1. 10sexyapples
    Member
    Posted 1 year ago #

    I’ve been working with all of the new 3.0 features on the nightly builds as they have been happening, but, I’ve got an issue that I just haven’t been able to get past. I’m hoping someone can shed some light on this dilemma. My goal is to show only those terms, from the multiple custom hierarchical taxonomies I have, which are assigned to the current post, in the sidebar, in their hierarchical form, with a link to the terms archive page.

    In other words, I need to have all of the functionality that is provided using the wp_list_categories function ( taxonomy, link, hierarchy maintained, etc. ). I’m pulling my hair out attempting to achieve this as I don't believe there is a way to modify wp_list_categories to show only taxonomy terms of the current post, and there doesn’t seem to be any way to use get_the_terms_list so that it returns in such a way that it maintains the hierarchy of the terms?

    I have hierarchical taxonomies that have terms which are as many as 4 levels deep. Returning these terms without their hierarchical structure makes for a giant, incomprehensible, list of terms. Any clues??

  2. scribu
    Member
    Posted 1 year ago #

    I'm guessing you want to display only those branches in the hierarchy that have at least one term associated with the current post:

    Extending the Category Walker

  3. 10sexyapples
    Member
    Posted 1 year ago #

    Yes, you would be correct. I'll check that link right now.

  4. 10sexyapples
    Member
    Posted 1 year ago #

    Most excellent help!!! Thanks so much!!

Topic Closed

This topic has been closed to new replies.

About this Topic