Page to display an archive of taxonomies

My website needs to have two custom post types and each of these has two custom taxonomies with several terms each. These terms also have to be hierarchical.

My problem is, that I don’t know how to set up a page, that displays all the first level taxonomy-terms of a given CPT. This page should work like a menu. If the user clicks on a term that also has child terms, a new page should be loaded, which displays them.

After having selected the term, an archive page should be loaded which display all the articles that are tagged with the selected taxononomy-term.

Furthermore the URL should include the term-slug if that’s possible…

enter image description here

If being on the “Proof for cations”-page, the url should be: example.com/practical-courses/qualitative-analysis/proof-for-cations/

Is this possible with a plugin? Or do I have to program it myself? If so, would you be so kind to help me a little bit on how to set this up? Thank you very much! 🙂

Page wireframes

These are wireframes of the pages, so you better understand what I’m trying to do.

Step 1

First begin on the Home screen:
enter image description here
URL: example.com/

Step 2

From here, the user can click on Theory or -as in this example- on Practical Courses in the menu bar. He should then see a page that displays all the 1st level taxonomy terms of the selected posttype.
enter image description here
URL: example.com/practical-courses/

Each term should also have a thumbnail, so that they better represent what they are.

Step 3

The user will now choose to which practical course he wants to see more information. After selecting one, he should get a page, which displays all the child terms of the selected term:
enter image description here
URL: example.com/practical-courses/qualitative-analysis/

Step 4

The user can now chose one of the displayed sub-terms and is then redirected to an archive page, which displays all the posts of the selected post type which have both terms added to them. So in our case he will see a listing with all the proof reactions for anions.
enter image description here
URL: example.com/practical-courses/qualitative-analysis/proof-for-anions/

Step 5

After chosing one, he is finally redirected to the single post of this proof reaction:
enter image description here
URL: example.com/practical-courses/qualitative-analysis/proof-for-anions/sulfate/

PS

Please note, that there is not always a second level of therms, so Step 3 mab be pointless in some cases and therefore should only be displayed, if the selected term has child terms. If it hasn’t, the archive page should be displayed.

1 Answer
1

  1. Create the new page template.
  2. Get Terms list manually in that template.
  3. Create the term template for displaying all posts for that term

Leave a Comment