How To Create a WordPress Theme: The Ultimate WordPress Theme Tutorial

Update: We’ve created a second edition of this popular tutorial! It contains updated code samples, coverage of the latest theme development techniques, and more. Check it out at The ThemeShaper WordPress Theme Tutorial: 2nd Edition.

In only 11 individual lessons this WordPress Theme Tutorial is going to show you how to build a powerful, up-to-date, WordPress Theme from scratch. As we go along I’ll explain what’s happening including (for better or worse) my thinking on certain techniques and why I’m choosing one path over another. Essentially, I’ll be teaching you everything you need to know about WordPress Theme development.

Skip to the Table of Contents.

tutorial-graphic-large

Here’s the list of features your finished theme will be able to boast of:

  • All the search-engine optimization you’ll really need
  • Including google-supported Microformat markup
  • Valid and logical semantic markup structure than can be used to create ANY layout
  • Smart default CSS layouts
  • Dynamic Body, post and comment classes
  • Separated trackbacks and threaded comments
  • 2 widget areas coded to disappear when they’re empty
  • And all the typical WordPress stuff you expect from a theme

I think that’s kind of impressive—for any WordPress Theme.

At the end of this tutorial, with code in hand, you’ll be able to do almost anything you want. You can even think of the finished Theme as your own personal website development framework for WordPress.

I’ve already used it to start another project of my own, The Shape Theme. Download it and check it out if you’d like to see some of the finished code we’ll be going through, live, in action. Alternately, you can browse through the up-to-date source code for the entire tutorial on Google Code.

WordPress Theme Tutorial Table of Contents

Ready for a WordPress Theme Tutorial that will show you how to create a powerful WordPress Theme from scratch? Read it from the beginning and code yourself up something awesome.

  1. WordPress Theme Tutorial Introduction
  2. Theme Development Tools
  3. Creating a Theme HTML Structure
  4. Template and Directory Structure
  5. The Header Template
  6. The Index Template
  7. The Single Post, Post Attachment, & 404 Templates
  8. The Comments Template
  9. The Search Template & The Page Template
  10. The Archive, Author, Category & Tags Template
  11. The Sidebar Template
  12. Reset-Rebuild Theme CSS & Define Your Layouts

Author: Ian Stewart

Ian Stewart is probably thinking about WordPress Themes right this very minute.

318 thoughts on “How To Create a WordPress Theme: The Ultimate WordPress Theme Tutorial”

  1. Awesome tutorial, I am now going to start my first WordPress theme with your site open as I go along. I will no doubt add comments later with a peek at my work. If it turns out any good of course 🙂

    Thanks.

  2. Thank you for your generosity in sharing these detailed instructions and files. It was a great source of reference as I setup my 1st WordPress template.

    thank you,

    ~ gabriel

  3. Big big thanks!
    I just type “how to create a wordpress theme” and pam, falling into your site that i think, will be really useful for me!
    *Run to read your tutorials*. ❤

  4. Thanks Ian for the tutorial. I’ve just started.
    One thing that would be helpful is for one to see how current this tutorial is. I went through another tutorial series that I thinks was about 4 years old. I now the basics of WP development remain, but it would be nice to know that there have been regular updates.

    For example I would say right your home page:
    • This tutorial was originally written on xx/xx/xxxx.
    • The most recent update was on xx/xx/xxxx.

    This would give me confidence that you are still actively monitoring things and updating things for the tutorial.

  5. Fantastic tutorial to build a clear structured default theme to base all future websites on!
    Thanks so much for putting it all together!

    One sidenote though, there is nothing about the footer template and a lot of plugins won’t work when is not called for.

    I also second Bob T's suggestion to show how current the instructions are.

  6. Hi,

    You can send your design and get that converted to WordPress, PSD TO WORDPRESS code your design to a WordPress Theme.

    The website is http://www.psdtowordpress.eu/

    They do cross-browser compatible valid WordPress Theme and they offer a Non Disclosure Agreement (NDA) for all customers.

    Hope it’s useful 🙂

  7. I tried to design my own webpresss theme for my website last year but in the end gave up because it was just too hard. My photoshop skill and html coding have improved a great deal now so I will give it a go again after reading this insperational tutorial.

  8. Pingback: Back on Track
  9. Thanks a lot!! I had moded themes before, but this is the first time i had to create a couple from scratch and w/o this guide it wouldve been an even dautiner task.

Comments are closed.