|
Create a New WordPress Theme
WordPress makes it easy
by Sam Mela article #000014
WordPress is a wonderfully flexible blogging framework.
If you use WordPress much, you will eventually want to make some changes in the appearance of your blog.
Often the best way to give your blog a facelift is to create a new WordPress theme, and the developers of Wordpress have made this easy to do. This article tells you how to create a new theme. Future articles will tell you how to make visual modifications in your theme.
Here's the procedure for creating a new WordPress theme, in a nutshell:
- Start with an existing theme that you want to modify
- Copy that theme directory to a new theme directory
- Edit the style.css file in the new theme directory.
- Upload the theme directory to your Web site.
- From the WordPress Admin console, activate the new theme.
That's it.
The following sections provide detailed descriptions for implementing the above steps.
Start with an Existing Theme
Pick a theme that is already installed in your blog. It doesn't need to be activated, just installed. Pick one you like.
Copy the Theme to a New Theme directory
Both the old theme (the one you start with) and the new theme (the one you are creating) should be located in the themes directory of the wp-content directory.
Here's the hierarchy: main wordpress directory/wp-content/themes
If for example, you are copying the "WordPress Default" them to the "Sam Mela " theme, you will copy the "default" directory to the "sam-mela" directory.
So, on a PC, the relationship of directories should look like the following:
Edit the "style" css file in the new theme directory
Now that you have copied the old theme to your new theme directory, you need to edit the "style" css file.
Every theme has a "style" css file. That file starts out with some information that WordPress uses to display information about the style in the admin console. You will need to change this information. Here is the information contained in the default WordPress version 2,84 release to use as an EXAMPLE:
/*
ORIGINAL THEME style.css HEADER
-------------------------------
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
*/
Please note that this article does not provide detailed information on copyright and licensing issues, however, it is important to note that many WordPress themes are released under the GPL license. It is your responsibility to follow copyright law and respect licensing.
The "tags" information is to support the WordPress ability to do searches on various theme attributes.
Our modified version of the style.css file header, located in the samemela dirctory, would look something like the following:
/*
MODIFIED THEME style.css HEADER
-------------------------------
Theme Name: Sam Mela
Theme URI: none
Description: This is an example theme, based on the Default WordPress Theme
Version: 1.6
Author: Sam Mela
Author URI: http://sammela.com
Tags: blue, custom header, fixed width, two columns, widgets
Kubrick v1.5
This theme was designed and built by Sam Mela,
whose blog you will find at http://sammela.com/
The CSS, XHTML and design is released under GPL:
http://www.opensource.org/licenses/gpl-license.php
*/
Upload the New Theme to your Web Site
Using FTP or whatever system is in your editor/Web design software, upload the new theme folder to your Web site.
Activate the New Theme
- Log into your WordPress management console.
- On the left side of the console, about 1/2 way down, click on the "Appearance" link.
- Your theme should show up under "Available Themes", in the lower right hand side of the page.
- Click on the "Activate" link for your theme.
WordPress should now be using your theme.
Check the New Theme
If you want to check that you are actually using the new theme, do "view page source" and search for wp-content/themes/xxxxxxx where xxxxxxx is your theme name.
Need help? Call us at (703) 652-5436.
|