Skip to main content
WordPress made easy with the drag & drop Total WordPress Theme!Learn More

10 Tips For Building Your 1st WordPress Theme

Last updated on:
Sustainable Total Theme Events Calendar

I started building WordPress Themes about 1 year ago and I really enjoy it. Not only do you get down and dirty with your usual XHTMl and CSS files but now you get to add in some sweet php coding. Starting out can be the hardest thing, especially if you aren’t an experienced web developer. When I started I didn’t even know how to create a manual <a href=””></a>  link. There was quite a big learning curve at first but I learned a lot through experimenting and now I have some really great skills.

In order to help you out in your journey to creating your first WordPress Theme, I wanted to give you 10 tips that can help you out and make it easier for you to do so.

10 Tips For Building Your First WordPress Theme

Are you ready? Here are our 10 best tips for building your first WordPress theme in 2011. Let’s get started folks!

1. Start The Default WordPress Theme

The best way to learn how WordPress works is by looking at a theme in action. When you just starting out I suggest you download  the default WordPress Theme and inspect every element so you can see exactly how it all works and what it does.

2. Know Your Template Tags

WordPress Themes are composed of several ‘Template Tags” which you can use to achieve various effects. Such as <?php the_content(); ?>, which

will show the content of a given post of page wherever this is placed. There are tons of different template tags that are used for different things. You are going to want to become familiar with these. All of them are available at the WordPress Codex.

3. Customize A Theme First

Unless you have previous HTML and CSS knowledge and you can easily create a site already, I suggest you start by downloading a few basic themes and customizing them so you can learn more quickly how themes are composed and how the stylesheet works. Otherwise, step onto the next tip.

4. Start With Your Index.php File

At first when I started coding themes I would go ahead and make all the various files (header.php, index.php,footer.php, sidebar.php…) and then start adding code to each one. Eventually you want all your code separated into these files, however, if you create your index.php file first with all your code you can easily preview it as you make changes. Then once done you can divide it into its proper sections.

5. Don’t Hardcode

If you are looking to give themes away or sell themes in the future you should get into the habit of not hard-coding any links in your theme. Always use <?php bloginfo(‘template_url’);?> when you are linking to images or files from within your theme’s folder.

6. KISS

If you are a novice designer your first WordPress Theme should be very simple. Creating a simple theme first will help you understand all the basics and get you ready for a harder project. Stick with a minimalist design and try and grasp all the various php code, functions and template tags associated with wordpress.

7. Seek Help Online

The internet is the best source for any web developer. If you don’t know how to code something or you are having problems with clearing floated elements, you will find a solution online. Whenever you get stumped (which i am sure you will) there are tons of great resources online. You can checkout some blogs, article sites, wordpress.org or even some web forums. For developing themes the place is probably the wordpress.org forum. There are always people there willing to help you out (including myself).

8. Work Live

Whenever I am designing a new theme I like working “live”, meaning that I create everything and drag it onto my server as I am working (you can use a local database as well, but I like to use my theme-building secret domain). As soon as the first few lines of your stylesheet and index file are done you can pretty much activate the theme and see it as you progress through your design. This way you can see exactly what it looks like as you work and not be surprised upon finishing that it looks horrible.

9. Save Your Work

This tip may sound a bit obvious but I made the mistake of trashing some of the custom themes I created when I first started out. Since a lot of the code is “modular” it will save you lots of time and effort in the future if you keep it all. For example, if you spent a couple hours writing your comments.php file you should save this and use the same one on future themes. You can also copy and paste your loops from previous themes on new ones to save you some time. But if you do reuse any code make sure the code is not deprecated and that is still meets the newer standards.

10. Have Fun

Whenever you are designing a theme try and have fun with it. If you aren’t in the mood just put it aside and do something else. I have found that all the best sites I made I did when I was in a good mood and was having fun with it.

Subscribe to the Newsletter

Get our latest news, tutorials, guides, tips & deals delivered to your inbox.

Comments

No comments yet. Why don't you kick off the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *

Learn how your comment data is processed by viewing our privacy policy here.