Assigning templates to grouping of tags?
-
I need to be able to assign “tag templates” like we’re able to assign “page templates”. Not sure if this is possible.
I understand the template hierarchy, where tag-slug.php is looked for, the tag.php, etc. That’s fine. Except that I have hundreds of tags, and I need to display them in two or three different ways. It is not practicable to create a new tag-slug.php for each tag added. Is there a way to assign a tag template? You can do it for pages, but not tags that I can see…
For example, if my tags are: labrador, poodle, persian, terrier, ragdoll, and siamese, and my templates are cats and dogs, I’d like to assign “cats” to persian, ragdoll and siamese, and “dogs” to labrador, poodle and terrier.
Then, later, if I use the tags mastiff, shepherd and spaniel, I can just assign them the “dogs” template.
Any assistance on this would be greatly appreciated. I haven’t seem to find anything on this topic despite searching the codex, the forum and googling it.
The site is being developped locally at the moment, so no live link, sorry.
Thanks
- The topic ‘Assigning templates to grouping of tags?’ is closed to new replies.