i have category-events.php to list my posts tagged ‘events’ but it wont work for ‘events’ child categories.
ie i have some posts tagged ‘events’ and one of events’ children ‘exhibition’. I thought it would use category-events.php automatically but it doesn’t. Is this possible as i want to user category-events.php for several of ‘events’ child categories.
hope that makes sense and any pointers welcome.
dan.
First paste this code in your theme’s functions.php
then on your category.php or archive.php (depends on your theme) at the very top add
and change 33 to the ID of the ‘events’ category.
What it does is check if the current category is a child category of events and if so it uses the right theme file.
ah – found it here!
Make all subcategories use the template of its category parent?
thanks…