I am working through how to organize my site and am running into an issue with how to customize the list page for a particular term, and am not sure I am approaching the problem the right way.
Say I have taxonomy
How would I go about making a custom template for a particular category term: categories/someterm?
I am also wondering how I can add a description (or other data) to a term. I was thinking I could create a new type that’s just descriptions of terms and then (not sure if this is doable) have it pull in that description content from the taxonomy term template somehow.
Not having taxonomy metadata is really annoying in WordPress. I’m not sure if this is possible.
As to the template: I would say that if that category is worthy its own template/section, it would also worthy its own SECTION.
Sections are the way to go it seems. The reason I steered away from them at first was because I wanted to use taxonomies as my main way to organize content, and playing around at first it seemed like taxonomy templates would always take precedence (it turned section templates won’t work if the section folder is empty). I was able to build taxonomy lists into section templates for sections of the same name, then customizing the section template to pull taxonomy terms. This has an advantage over building a taxonomy template, since now I can add custom content to the section via pages under that section.
I think this workflow works for me. Let’s say I had a recipe blog and I have taxonomies for grain, fruit, beans, veggies, etc. A recipe might fall under many taxonomy terms across different groups. I can define my default taxonomy templates as a starter, but say I want to customize the fruit section, I can just make a section template pulling in things based on that taxonomy, adding some other content via pages that I render into the section template. What I can’t do is make a template for a sub-section, but it seems that is coming soon (http://discuss.gohugo.io/t/nested-sections/294).
For term level customization I tried changing the template to list only those with a certain content type, in my case no content type (all posts are in root), then have a section that I built out called terms that I use to pull in details of a particular term. This just lets me add some top info to a term before I start listing posts, so not really the full level of customization I was hoping for, so I will probably avoid this for now and go the above route with subsection templates when those come about.
For sake of argument, some customization of term templates should be able to be made by calling to content with the same name as the taxonomy. https://gohugo.io/extras/datafiles/