How to have a custom archive page for each subcategory of a custom taxonomy

I’ve been trying to find a solution for lots of days but could not figure it out.

The structure of my custom posts urls is : custompost/category/subcategory/posttitle ; some posts have a subcategory, some don’t.

What I want to do :

on custompost/category url : display all the posts who are related to this category
on custompost/category/subcategory url : display all the posts who are related to this subcategory
on custompost/category/postname url : display this post

What I’ve already done :

create a custom taxonomy
give a category and a subcategory to each post
create a sort of custom archive : custompost/category

What I would like to figure out :

a way to create a sort of custom archive for each subcategory

Thanks for your help !

Read more here:: How to have a custom archive page for each subcategory of a custom taxonomy

Leave a Reply

Your email address will not be published. Required fields are marked *