This is the sixth post in series about creating WordPress themes with your Photoshop designs. You may want to review before we continue….
Part 1 – “Tools For The Task” and “Preparation”
Part 2 – “Layout And Structure” and “Designing WordPress Themes in Photoshop”
Part 3 – “Photoshop to XHTML in 24 Hours”
Part 4 – “Cleaning Up Your XHTML”
Part 5 – “Preloading Images with Javascript and CSS”
Marking Up Is Hard To Do
Wikipedia defines the term markup as a set of annotations to text that describe how it is to be structured, laid out, or formatted. When we say we’re going to ‘mark something up’ it means we’re formatting the document so that it can be read correctly by machines. Hypertext Markup Language (HTML) is the most common form. That can be marked up to Extensible Hyper-text Markup Language (XHTML) and beyond that to PHP to become dynamic.
Now that we’ve got our basic html layout design we can begin the hard work the transition from HTML to PHP.
Anatomy of a WordPress Theme
Before we get ahead of ourselves let’s analyze exactly what WordPress is expecting from a theme. The WordPress engine works primarily using separate PHP files for the different components of the core engine. The various parts of your theme will simply call for various parts of the core engine to display content. This makes it easy for you to style sections individually. It also can allow for some incredibly complex themes that are built on the WordPress engine. Themes like the The Unstandard by Derek Punsalan and Redoable are great examples of how to rethink the WordPress theme impressively.
Fundamentally, the WordPress Theme system is a way to “skin” your weblog. Yet, it is more than just a “skin.” Skinning your site implies that only the design is changed. WordPress Themes can provide much more control over the look and presentation of the material on your website.
A WordPress Theme is a collection of files that work together to produce a graphical interface with an underlying unifying design for a weblog. These files are called template files. A theme modifies the way the site is displayed, without modifying the underlying software. Themes may include customized template files, image files (*.jpg, *.gif), style sheets (*.css), custom Pages, as well as any necessary code files (*.php).
Here are the things WordPress looks for a theme file:
- 404 Template = 404.php
- Archive Template = archive.php
- Archive Index Page = archives.php
- Comments Template = comments.php
- Footer Template = footer.php
- Header Template = header.php
- Links = links.php
- Main Template = index.php
- Page Template = page.php
- Popup Comments Template = comments-popup.php
- Post Template = single.php
- Search Form = searchform.php
- Search Template = search.php
- Sidebar Template = sidebar.php
- Stylesheet = style.css
For the most part, if you’re missing any of these parts your theme either won’t work or won’t fully function the way WordPress wants it to. So far the only thing we’ve completed is stylesheet.css so where do the rest come from? In Part 7 we’ll create index.php and start marking up our XHTML to PHP.





One Response to “Designing and Coding a WordPress Theme From Scratch (Part 6)”
November 10, 2009
SusanThis whole series is awesome and exactly what I am looking for! My question is, I want to use a WordPress theme framework (Reptile from Theme Bandits) and make a theme for it. Will everything here still apply?