I’ve inherited a WordPress site that my company built before I started working here. I would go and ask this question of the guy who built it, but he has now left the company.
My query relates to custom templates for wordpress categories. I know that you’re able to create a template file called category-.php, and when that category is accessed, it’ll use that custom template. In this instance, the file is called ‘category-limousin-magazine.php’
That is working fine – my issues relates to the sub-categories of this category, i.e. under Limousin Magazine, I’ve got categories of 2011, 2010, 2009, 2008, 2007 and 2006. Somehow, when building the site, he was able to get all of these sub-categories to use the template of ‘category-limousin-magazine-templates.php’ – but I can’t figure out how he did it, as when I run the current site, next to an archive copy of the site previously, the category-limousin-magazine-templates.php file is being totally ignored.
So I have one of two questions – first of all, is there an easy way to get multiple categories to use one single template file, or failing that, what is the best way of getting multiple (potentially dynamic) categories from using a custom template.
Thank you.
I found the answer – this was in the function.php file – I just needed to update the category ID (long story):
I wrote a plugin a while back that might help make this easier.
Found this plugin and seems like it overrides the category page using some custom post type and seems to be a better alternative.