I love it when I discover cool new sites! It’s a theme meant for hacking and learning to build themes – have at it! http://underscores.me/
RachieVee: Rachel's Blog Posts
The Required WordPress Theme Files
There are only 2 files that are actually required in a WordPress theme for it to be detected and applicable in WordPress. Those 2 files are style.css and index.php.
And then there are those “unsaid” files – those “secret” requirements that become the scuttlebutt amongst developers and are the difference between a good quality theme or “What noob built this thing?!”
So how far do you go? Aside from the required WordPress theme files, what files should actually be present in a theme regardless of whether they’re literally required and why? Well I’ve gone through a fair share of WordPress builds, and I’d like to share my thoughts on that.
The big question: Does category.php apply to the children of the targeted category?
The answer: No. So now what?
For those not familiar with the power of category.php within a theme, you can catch up here. In a nutshell, you can apply a custom template to a specific category just by naming the template file with a convention that gets automatically picked up by WordPress. It’s a really awesome feature to take advantage of, but there’s one problem.
Category.php will not apply to the category’s children/sub-categories. So then, how do we apply a template to sub-categories? After lurking around online to find forum threads like this, and brainstorming with a co-worker of mine, I found some solutions to the problem and wanted to share them.