Skip Navigation

[Gelöst] Categories in filter with subcategories

This support ticket is created vor 2 Jahre, 6 Monate. 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 3 Antworten, has 2 Stimmen.

Last updated by Luo Yang vor 2 Jahre, 6 Monate.

Assisted by: Luo Yang.

Author
Artikel
#2190113

Hi

I made a view with filters on hidden link
On Categorie and Land we have many subcategories. This creates a long list of options.
Can we put the subcategories in an accordeon?

Just like the main site, for instance: hidden link

Is it also possible to sort the list on post count? So that the category with the largest number of posts is the first in the list?

#2190495
post-count.png

Hello,

There isn't such kind of built-in feature within Views custom search form, and the example URL you mentioned above:
hidden link
It is a taxonomy archive page, and displaying term's archive link, if you want the same result, you can try these:

1) Create a nested view:
a) Parent taxonomy view:
- Query terms of taxonomy "Categorie",
- Filter by:
Select taxonomy terms whose parent is None.
- In view's loop, display the term's information + below child taxonomy view
b) Child taxonomy view:
- Query terms of taxonomy "Categorie",
- Filter by:
Select taxonomy terms whose parent is the value set by the parent view.
- In view's loop, display the term's information

2) Create a Toolset WordPress Archive for taxonomy "Categorie"
https://toolset.com/course-lesson/creating-a-custom-archive-page/
and display the "Parent taxonomy view" shortcode.

For the question "Is it also possible to sort the list on post count"?
Yes, it is possible within taxonomy view, you can sort the terms by post count, see my screenshot post-count.JPG

#2192991

Hi
I made the nested view, with this output
hidden link

this is working well. The sorting on post count is working as well.

The problem is, I already have an Archive for taxonomy "Categorie" in use.
So what should be step 2? How do I get this list in the filter?

#2193393

You can edit the existed Archive for taxonomy "Categorie", display the "Parent taxonomy view" shortcode, for example:
[wpv-view name="my-view"]

And format/style the WordPress Archive to what you want.

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