When I decided to create WordPress themes, I was amazed by the file structure that is behind a theme working on WordPress. I had only been used to creating Tumblr themes which are pretty much just an HTML file with some of the Tumblr options included. And then I looked at free WordPress themes and I was so confused. Why couldn’t you just have a single index file and include everything you would need in this one file?
Seeing the lines of code made it obvious pretty fast why themes have a lot of files in their folders. It’s a help to have this kind of file structure that WordPress has. I think not understanding the file structure of a theme is what also made me feel confused about WordPress in general. I didn’t know how the system actually worked. Add to that that a theme is so much more than just how pretty your website is. It’s adding functionality that you might not have with every theme and it’s a place to show yourself to others and the world.
Let’s go back the to all of those files in a WordPress theme. Back when I started out, I couldn’t understand what it was about having that many different files. Sometimes you couldn’t decipher a function because it was defined in another file (I’m looking at you functions.php!) and you’d wonder why the theme was working the way it was. I knew the file structure was there to help me. But I couldn’t, for the life of me figure out how things at worked at first. I was reading so many articles and blog posts about WordPress themes and how to create them. However, I never found a somewhat comprehensive starter guide that could help me.
The Codex and, now, the Developers’ Handbook have really been a help, though (I’m learning new things every day and I love it). If you decide to create your own WordPress themes, you definitely need to check out those resources because they are a fountain of knowledge. There’s only one catch. They include almost everything or not the thing you need in that moment.
This is why I have created a handy, little guide. I really think it has surpassed the cheat sheet stage. In it, I’m giving you guys an overview of the files in a WordPress theme and what their purpose is. So, check it out below. And let me know what you were confused about when you started using WordPress in the comments below!