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?
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
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?
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.