Skip Navigation

[Résolu] Help with nested views – hierarchial taxonomy

This support ticket is created Il y a 7 années et 1 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 réponses, has 2 voix.

Last updated by Luo Yang Il y a 7 années.

Assisted by: Luo Yang.

Auteur
Publications
#506976

I am trying to create a Directory page where the parametric search includes parent taxonomy and child taxonomy. I was successful in building a single View which displays all categories and filters the results by the selected category. What I am instead trying to do is display parent categories only, and when a parent is clicked then showing the child categories, and then filtering the results by the selected child category.

I realize there will probably be javascript involved to hide/show the child categories upon the click on the parent. Where I need help is nesting the Views to organize the filter properly.

I have an example website that demonstrates what I'm trying to do, if I could please add a link to the example in a private reply.

#507221

Hi,

There isn't such a built-in feature within Views plugin, and if you agree, we can take it as a feature request, and if you need workaround with custom codes, it is out the range of Toolset support, I suggest you check out our certified partners for it:
https://toolset.com/consultant/

#507377

Thank you for the reply. I am not sure that my general description was specific enough. Could I please show the example that I'm trying to emulate? I do not wish to show the link publicly since that site has nothing to do with this other than having the functionality I'm seeking to create.

#507735

Please provide the demo link in below private detail box, thanks

#508055

Thanks for the details, I assume we are talking about the left area "Directory" of the URL you mentioned above.

I think it is possible within Views.

1) when you click each term's link, it redirect you the to archive page of the term, you can setup the link with Views shortcode [wpv-taxonomy-link]

2) You can create a nested view:
a) Parent view, For the top level terms's, list the terms of your custom taxonomy, filter with:
Select taxonomy terms whose parent is None.

And use [wpv-conditional] shortcode to check if the current term archive page is the current term of parent view, or the current term archive page is ancestor of current term, then display the child view when.
More help:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-taxonomy-archive
This shortcode displays information about the current taxonomy (usable only for taxonomy queries).
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional
Conditional shortcode to be used to display a specific block of meta HTML based on results of a boolean expression

b) Child view list child terms of parent terms, filter by:
Select taxonomy terms whose parent is the value set by the parent view.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.