Hi! I'm trying to make an archive page where each post are grouped under a taxonomy.
The taxonomy will be like a Chapter Category, so it will keep increasing as time goes by (like a webcomic) - I was wondering if it will be possible to have this done automatically?
I would like to display links grouped under taxonomy without manually adding a separate view for each taxonomy, because it would result to a lot of views and would clutter up the database. I have added an image to show what I would like to happen.
Is it possible for this to do?
Thank you!
Hi, let me be sure I understand what you're asking. It sounds like your custom taxonomy is called "Chapter Category", and the terms in this custom taxonomy are "Taxonomy A", "Taxonomy B", and so on. You would like to list all the terms, and include all the posts associated with each term in the list. Is this correct?
If so, then you can accomplish this with only two Views:
- Create a View of Posts and add a Query Filter by taxonomy term, where the term slug is set by the parent taxonomy View.
- In the Loop Output editor of this View, insert a link to the post using the wpv-post-link shortcode.
- Create a View of the Taxonomy "Chapter Category" terms
- In the Loop Output editor of this View, insert the taxonomy term title using the wpv-taxonomy-title shortcode.
- After the wpv-taxonomy-title shortcode, insert the View of Posts you created in step 1.
- Finally, insert the View of Taxonomy terms in a custom Page, or insert the View just before the wpv-loop tag in a WordPress Archive assigned to this taxonomy.
Hi Christian! Thank you so much for the response!
I was able to follow everything, but the view returns with a duplicate of the taxonomy and it did not show any items ("No Items Found")
View #1:
Taxonomy filter
Select posts with taxonomy: Storylines set by the parent Taxonomy View
And in between the loop, i have: [wpv-post-link]
View #2:
[wpv-post-taxonomy type="my-comic-chapter"]
[wpv-view name="comic-all-view" limit="-1" orderby="date" order="asc" cached="off"]
And then I added the View #2 to a custom page - but it only shows the thing in the screenshot.
Please let me know how to proceed, thank you!
I was able to figure it out! For the Views #1, the taxonomy filter should be set to "the same as the current post in the loop" instead of "Set by the Parent Taxonomy View" -- so far it's been working well, but I will have to continue to check.
Thank you for the help!
Please take screenshots of both View editor screens in wp-admin so I can see how the Content Selection and Query Filters are configured.
[wpv-post-taxonomy type="my-comic-chapter"]
The wpv-post-taxonomy shortcode only works in the context of a post, but View #2 should be a View of terms. In the Loop you can use the Fields & Views button to insert the taxonomy title shortcode wpv-taxonomy-title instead, or a taxonomy link shortcode.
Oh okay great, I didn't see your response before sending mine. Let me know if you need more assistance.