Skip Navigation

[Resolved] hierarchical taxonomy with shortcode – continuation

This support ticket is created 7 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 replies, has 3 voices.

Last updated by Christian Cox 7 years ago.

Assisted by: Christian Cox.

Author
Posts
#588644
list2.png
list1.png

This is a continuation of the topic: https://toolset.com/forums/topic/hierarchical-taxonomy-with-shortcode-display_post_tax_terms_hierarchical/

Now it's displayed but the taxonomy list is not hierarchical...

#588752

I think it is best I pass this ticket directly to Christian, since he is already familiar with the topic.
He will be with you tomorrow.

Thank you for the patience!

#588929

The shortcode you have implemented depends on term ID for ordering terms. It assumes that you create the high-level terms before the low-level terms, so "język polski (PL)" should have a lower ID than its child terms. Can you tell me the term ID of each of these terms?
PL > PJM
PL > SJM
PL > IS
język polski (PL)

#588932

PL > PJM - 4491
PL > SJM - 4490
PL > IS - 4489
język polski (PL) - 16

Is it possible to distinguish parent taxonomies on the list?

#588967

I'm afraid it's not possible to distinguish between hierarchical levels in this type of display. You could implement a nested View that would accomplish something like that.
- Create a View of your taxonomy filtered by taxonomy term, where the term is supplied by the current post or page. Add another filter that filters by taxonomy parent, where the parent term is "None". In the Loop Output, include the top-level term using [wpv-taxonomy-title].
- Create another View of your taxonomy filtered by taxonomy parent, where the parent is determined by the parent taxonomy View. In the Loop Output, include the lower-level term using [wpv-taxonomy-title]. Place this View in the Loop Output of the previous View.

Let me know how you would like to proceed here.