What makes up a WordPress Theme? How do you create a WordPress Theme?
I’ve always been intrigued by software and how it’s created. I’ve been a programmer for many years and it’s still fun to create software that other people use in their daily lives.
Although we won’t be delving into actual programming in this article, future articles in this series will include program code. So don’t be afraid. It’s just like learning a different language.
I’ll be turning this into a series since there’s quite a bit of ground to cover. Make sure you subscribe so you don’t miss a thing.
What is WordPress – Briefly
WordPress is extremely flexible when it comes to creating websites. It’s not only used for blogging, which is a type of website, but other types of websites like image galleries, static information type websites, and sales pages to sell a product or service.
The list of what you can use WordPress for is as long as your imagination. Of course, it might be the best solution sometimes but it is rather robust.
What Makes Up a Word Press Theme?
There are many attributes that make up a theme but I’ll start with the files you need to create a minimal WordPress Theme. In fact, I’ll use Leo Babauta’s free mnmlist WordPress Theme as an example.
Here is a list of files that make up the mnmlist theme:
404.php – The 404.php file will help direct our visitors to a page that might be missing. In other words, if a visitor browses to a misspelled page like ourblog.com/this-cool-articlee (notice the double “ee” on the end of the word “articlee”. The 404 page will display a page to the user to help them find what they were looking for.
footer.php – The footer.php file will display a footer at the bottom of our theme with whatever we want to display or track in the footer.
header.php – The header.php file will display a header at the top of our theme along with other important information.
index.php – This is the main and first file that gets read by the browser when a visitor visits our site. The index.php file will pull a lot of the elements together that make up a WordPress Theme.
page.php – WordPress is made up of posts and pages. Posts are typically the dated content that displays on a blog and pages are more static type information like a contact page. A visitor to your site typically can reach a page by a menu choice.
sidebar.php – The sidebar.php file will display a sidebar in our theme. This is where you typically see RSS buttons, FeedBurner count, popular posts, etc.
single.php – This is the file that will display our blog posts on a single page after a visitor has clicked on one of our blog post titles from the blog’s index page (index.php).
style.css – The style.css is the file that contains CSS (Cascading Style Sheets) code that renders what our blog looks like – aesthetically.
And that’s it for now. The above files are used with the mnmlist WordPress Theme. Some of the files are required for all themes and others are not required. There are even more files you can create to enhance your blog.
Next time, we’ll start digging inside of these files.
Photo Credit: fdecomite