wordpress: creating your own custom theme (part 2)

i feel that i should add a few notes as an addendum to my previous post — call it the “companion pack,” if you will

  • after you modify the “default” folder in the “wp-content\themes” directory, make a copy of it and rename it to something… anything…
    • i found this out the hard way. wordpress just recently did a string of updates (currently 2.8.2) and every time i’d do an update, my site would revert back to the default layout
    • luckily i had all my files locally so i was able to re-upload to the default folder
    • it only took me 3 upgrades to figure out that i had to rename the folder so that wordpress wouldn’t overwrite my work


in doing so, a couple changes need to be made:

update the “style.css” header info — by default, it reads this:

/*
Theme Name: WordPress Default
Theme URI: http://wordpress.org/
Description: The default WordPress theme based on the famous
<a href="http://binarybonsai.com/kubrick/">Kubrick</a>.
Version: 1.6
Author: Michael Heilemann
Author URI: http://binarybonsai.com/
Tags: blue, custom header, fixed width, two columns, widgets

 Kubrick v1.5
 http://binarybonsai.com/kubrick/

 This theme was designed and built by Michael Heilemann,
 whose blog you will find at http://binarybonsai.com/

 The CSS, XHTML and design is released under GPL:
 http://www.opensource.org/licenses/gpl-license.php

*/

i updated my site’s header to this:

/*
Theme Name: gorirraJoe
Description: The theme for www.gorirrajoe.com.
Author: Joey Hernandez
*/

OPTIONAL: if you want, you can create a new “screenshot.png” file, sized 300 x 225 (px) — it could be a screenshot, a logo, or a goatse photo (if you’re into that)

*upload these files to the server, then go to “Appearance > Themes

you’ll see your new screenshot along with the text that you added to the “style.css” file

new theme activated!
new theme activated!

it’s a nice little touch, especially if you created the theme for a client.

2 Responses to “wordpress: creating your own custom theme (part 2)”

  1. I would like to add that you want your folder name to be the same as your theme name. Someone might get confused if they were expecting to have the Gorirrajoe theme and then see that they downloaded the gorrira file.

    Also, it might be nice to offer the entire folder zipped in case someone wants to see what you did or if they really like your theme.

    **nice goatse reference, made me crack up**

  2. Joey says:

    good point about the theme/folder names being the same

    no one gets my theme but me… maybe after i’m done with it… maybe

Leave a Reply