Part Three: Once Begun, It’s Half Done

Posted by Nathan Chapman on September 12, 2008 - 1:37 pm

This post is one in the series on creating a Wordpress Theme, including design aspects, mock-up to code, WordPress’s PHP and debugging. This series assumes you know a little bit… If you’re still clueless after the series, contact me and I’ll explain further for you.

You’ve got your design done, completed. It’s hopefully very nice looking. You’re really hoping it looks good. “Great!” You say. “Now I can start with my fully-1337-uber-php-wordpress-skillz!”

No.

You’ve got one little step first: code your mockup into a static page. That shouldn’t take too long. Go on, go do it. I’m just going to sit here and wait.

Oh, and 10 points to the childish person that recognizes the page title!

You’re back? All Done? Great!

That is, believe it or not, the hardest thing (if you’ve coded correctly) that you’ll have to do. From now on in, we’re just adding WordPress’s own brand of PHP to your coding mix. Let’s start, shall we?

Read the rest of this entry »

Part Two: Mockups, Anyone?

Posted by Nathan Chapman on August 8, 2008 - 1:37 pm

This post is one in the series on creating a Wordpress Theme, including design aspects, mock-up to code, WordPress’s PHP and debugging. This series assumes you know a little bit… If you’re still clueless after the series, contact me and I’ll explain further for you.

A crucial part of the design process is planning - both on paper and in Photoshop. For a WordPress theme, a mockup is even more important, as the content can change at such a rapid pace.

What does your Blog Need?

Every blog needs a content space, but what else do you need? Sure, three sidebars would be nice, and you could use heaps of widgets and plugins, but do you need three? Can you make do with two, or even one? As you can see, Pixl’s current theme doesn’t have any sidebars.

Once you’ve decided on what your blog needs, you should decide where it needs these elements. Go on, decide what you need, then come back and continue reading. Yea, go on, I’ll wait for you.

First on Paper…

Yes. I know you’re itching for your keyboard and mouse, but don’t touch them!. Get some paper and a pencil. And you will need a ruler, too. If you can help it, use something larger than A4, the standard printing paper.

Rule out your body area, whether it is fluid, fixed - left, right or centred. Then, working form the top down, fill in the seperate elements of your page - the header, navigation, sidebars (if you have any!), content. Just the boxes for now, even if the element does not have a border.

Lastly, draft in a headline for a post or two, some basic content, the date - whatever your blog needs.

…Then in Photoshop

Yes, go on. Open Photoshop. I know you’ve wanted to all this time.

Just as before on paper, start with the body outline - but use Photoshop’s guides. Guides are created by dragging from the ruler onto the canvas. For the divisions between elements (such as the header, content), create more guides, but this time dragging from the horizontal ruler above the canvas.

Part One: What is a WordPress Theme?

Posted by Nathan Chapman on July 25, 2008 - 1:37 pm

This post is one in the series on creating a Wordpress Theme, including design aspects, mock-up to code, WordPress’s PHP and debugging. This series assumes you know a little bit… If you’re still clueless after the series, contact me and I’ll explain further for you.

Before you can make a WordPress theme (well, a good theme at any rate), you need to know what makes up a theme and how one works.

WordPress stores all of its data - your posts, comments, settings etc. - in a MySQL database, from which is uses PHP to “grab” data from this database.
A WordPress theme can be made of just one PHP file, however for editing purposes it is generally split up into four main files:

  • header.php
  • index.php
  • sidebar.php
  • footer.php

Three of these files (header.php, sidebar.php and footer.php) are “called” from index.php when a page or post is loaded.

Read the rest of this entry »