
Creating themes is another portion of WordPress development. While it certainly involves less programming than creating a plugin, there is still a fair amount of code “required”.
Themes are generally spread into multiple files, which are then (mostly) automatically included into each other on a as-needed basis. If we take a look the default theme, we can see the general structure of the files. The default theme has the following files (beside them I’ve included a short description of what they’re for):
404.php (displayed for 404 errors)
footer.php (the footer of the design)
index.php (the blog home page)
search.php (search result page)
archive.php (date, category and tag archive listings)
functions.php (can hold theme-dependent plugins, etc)
links.php (template for list of links)
sidebar.php (the sidebar of the design)
archives.php (template for list of archives)
header.php (the header of the design)
page.php (a page)
single.php (a single post)
comments-popup.php (popup form for comments)
image.php (attachment template)
style.css (CSS file)
comments.php (comments display loop)
As you can see the various sections of a WordPress site are separated into different files (archives, posts, pages). Additionally, the header, footer and sidebar also get their own file. This creates the design structure, which one of the various page types then fits into. Over the next few articles, we’ll be further discussing these files and how to create a theme from scratch.




