Display posts grouped by taxonomy
-
Hi everyone,
I’ve created a hierarchical taxonomy (Recipes) that has two main subgroups (Sweet and Savory) with several values in each subgroup (e.g. Cookies & Cakes in the first one, Appetizers & Entrees in the second one). What I’d like to do is display posts according to something like this:
GROUP A NAME (SWEET)
SUBGROUP A.1 NAME (COOKIES)
[list of posts with this taxonomy value]
SUBGROUP A.2 NAME (CAKES)
[list of posts with this taxonomy value]
GROUP B NAME (SAVORY)
SUBGROUP B.1 NAME (APPETIZERS)
[list of posts with this taxonomy value]
SUBGROUP B.2 NAME (ENTREES)
[list of posts with this taxonomy value]
Ideally I’d like new subgroups to appear dynamically as I continue to create more of them in the admin panel. Is this feasible?
My site is https://www.alittlebiteofeverything.com and I’m using a child theme of twenty-twelve.Any pointers on how to do this would be appreciated. I know I should create a page template but I’m not sure where to go from there. The only page template I’ve created so far by myself is the tag.php (you can view it in action here https://www.alittlebiteofeverything.com/tag/chocolate/
Thanks!
- The topic ‘Display posts grouped by taxonomy’ is closed to new replies.