is there any way to loop terms in a way they display in menu? Eg:
Let say I have 2 taxonomies in a post type - tax1 and tax2.
They are not hierarchical to each other.
If I have posts that have terms like this:
- post 1 => tax1 = p1 ,tax2 = term1
- post 2 => tax1 = p1 ,tax2 = term2
- post 3 => tax1 = p1 ,tax2 = term3
- post 4 => tax1 = p2 ,tax2 = termA
- post 4 => tax1 = p2 ,tax2 = termB
- ......etc
Can I use
if(tax1=p1) echo 'term1,term2, term3... in menu/widget'
elseif if(tax1=p2) echo 'termA,termB, termC... in menu/widget'
in my template to display the tax2 terms in the sidebar menu?
Somebody might wondering why I don't want to use parent-child terms. Well, this is because I expects have hundreds of term in tax2. If I use hierarchical taxonomy, that will be very long list in single taxonomy. I don't know whether WP able to process them or not.