Skip Navigation

[Resolved] Views and Archives for hierarchical taxonomies

This support ticket is created 6 years, 10 months 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 1 reply, has 2 voices.

Last updated by Beda 6 years, 10 months ago.

Assisted by: Beda.

Author
Posts
#607908
Taxonomy Posts Archive - Layout 2.JPG
Taxonomy Archive - Layout 1.JPG
Hierarchical-Taxonomy---Colouring.jpg

Please check Hierarchical Taxonomy - Colouring.JPG

What I want:

Taxonomy Level 1: Drawing Tutorial -> Click with show posts (Layout 2) belong to these taxonomies because they don't have sub-taxonomies.

Taxonomy Level 1: Colouring Books, Coloring Pages -> Click will show all taxonomies (level 2) (Layout 1) -> Click will show all taxonomies (level 3 if available) (Layout 1) -> Click will show posts belong to the taxonomy (Layout 2)

- I can use Views to filter to show Taxonomy - Parent = None (Taxonomy View - Layout 1)
- How can I auto set up Views/Archive for Taxonomy Level 2/ Level 3? (Taxonomy View - Layout 1)
- How to set up if no other sub-taxonomies, it will show all posts (Taxonomy Post Archive - Layout 2)

There are 2 layout:
- Layout 1 is for Taxonomies and Sub-Taxonomies
Feature Image of taxonomy + Taxonomy Title
- Layout 2 is for Taxonomy Post Archive
Show all posts belong to the selected taxonomy.

Specific Explaination:
1. hidden link - It will show all taxonomies belongs to Colouring Post Type (featured image + taxonomy title)
2. Click "Drawing Tutorial" -> it will show all posts (due to this taxonomy doesn't have sub-taxonomies -> correct)
3. Click "Colouring Pages" & "Colouring Books" -> it should show all taxonomies (level 2), not all posts.

Can let me know how to set up these thing?

I have found the thread with same issue, but the solution you have offered is for 2 level of taxonomies and same condition ( I mean all state will have cities -> all taxonomies will have sub taxonomies) . My issue is 3 level of taxonomies and not same condition - Parent taxonomy without sub taxonomies/ Parent taxonomy with level 2 taxonomy and Parent taxonomy with Level 3 taxonomy ...

https://toolset.com/forums/topic/showing-taxonomy-terms-only-once-a-drill-down-set-of-pages/

#608242

Taxonomy Level 1: Drawing Tutorial -> Click with show posts (Layout 2) belong to these taxonomies because they don't have sub-taxonomies.

1. You create a View, query Taxonomies
2. Add a Query Filter as:

Select taxonomy terms whose parent is None.

3. Create a Loop that outputs something like "[wpv-taxonomy-link]" which will create a Link to the single Term's Archive page.
4. Put this View on your final Page where you plan to show all this - let's call this "/the-page"

There you will be able to click on the Links, this will lead to the archive, where you are able to style the posts seen (which belong to this term only) with a WordPress Archive View
https://toolset.com/documentation/user-guides/normal-vs-archive-views/

Taxonomy Level 1: Colouring Books, Coloring Pages -> Click will show all taxonomies (level 2) (Layout 1) -> Click will show all taxonomies (level 3 if available) (Layout 1) -> Click will show posts belong to the taxonomy (Layout 2)

1. Create another Taxonomy View, this time use a Query Filter as:

Select taxonomy terms whose parent is your_term_here.

2. In the Loop, this time create accordions or similar, where the title is the Term, and the accordion content is:
2a) A Post View, which you create as below:
-- Create a post View
-- use a query filter like:

Select posts with taxonomy: your_taxonomy_here set by the parent Taxonomy View

3. Insert this new Taxonomy View as well to "/the-page"

You should now see a list of links that lead to the archives of each term with no parent
Also a list with terms that do have a given parent, and if clicked on them, a list with your posts (or can be a list of links to each archive's page as well, I am just outlining a different possible approach)

Specific Explaination:
1. hidden link - It will show all taxonomies belongs to Colouring Post Type (featured image + taxonomy title)
2. Click "Drawing Tutorial" -> it will show all posts (due to this taxonomy doesn't have sub-taxonomies -> correct)
3. Click "Colouring Pages" & "Colouring Books" -> it should show all taxonomies (level 2), not all posts.

1. Here you link to the Taxonomy Archive of the specific Term:
hidden link > click on "Drawing Tutorial" > hidden link (Specific term archive)
Here you will be able to show all Posts within the Term "drawing-tutorial"
But, I see no posts listed there yet, eventually you did not edit the Loop of the Archive?

2. When you click on "Colouring Pages" & "Colouring Books", I see the posts, correct, as this is what you can and usually do output on a Taxonomy Term Archive.
You are on a single Term Page here.
What you can do to list child terms here instead, is inserting a Taxonomy View into the Archive that has a Query Filter like:

Select taxonomy terms whose parent is the current taxonomy archive.

This will then produce a list of terms that are child to the current Term viewed.