I’m looking for the best way to echo a list of taxonomy terms from terms in a loop if they exist. Let’s see if I can properly explain this.
I have a loop running on my taxonomy-name.php page that simply lists all custom post types in an unordered list that have been added to one of three terms within that taxonomy.
Each of those posts also have 2 or 3 other taxonomies registered. What I want to do is echo another unordered list outside of the loop in my sidebar that displays only the terms that each of the posts have been added to for each additional taxonomy.
I can easily get those additional lists to echo all terms, but some of them that show up should not be there as the items in main list in the loop are not a part of the terms.
So what I’m looking for is a way to list terms in a taxonomy group, only if they exist based on what each of the main items in the loop have been categorized with.
- The topic ‘Echo list of terms on taxonomy page’ is closed to new replies.