10 Checks to the Perfect WordPress theme
I've seen it happen so often. People have a great blog, and at some point, they decide they need a new look and feel. They then decide to either buy one or use one of the free themes available at wordpress.org. There's a couple of things they'll look at, usually in the order: layout / look and feel, usability and optionally, room for advertising.
If the theme meets their needs in all two or three of these points, they download it and start installing it. If that's what you do too, this theme checklist is for you!
A theme has quite a few things it has to take care of, and a lot of themes out there don't take care of all of these. This is a checklist that should help you prevent getting into trouble when you start using a new theme.
If you're thinking of installing a theme, open up the directory that your supposed to upload, and check the following:
-
Hooks
WordPress plugins use so-called "hooks" to be able to perform their designated tasks. These hooks allow for instance to add extra output, tracking codes, etc. A lot of issues with plugins will arise for you when a theme author forgets to add these hooks. This is how to check for them:
- In header.php, it should have a small piece of PHP code that looks exactly like this
wp_head();or thisdo_action('wp_head');, usually just before a piece of HTML that looks like this:</head>. - In footer.php, it should have another small piece of PHP like this
wp_footer();, or thisdo_action('wp_footer'); - In comments.php and/or comments-popup.php, it should have a piece of code like this:
<?php do_action('comment_form', $post->ID); ?>, just before the</form>HTML tag.
- In header.php, it should have a small piece of PHP code that looks exactly like this
-
Template files
Another wise thing to do when you're changing themes, is compare theme files. If, for instance, your current theme has an author.php file, which contains the template for your author profiles, and your new one doesn't have that, that might be an unpleasant surprise when you install the theme. The files you should be checking for in your old and new theme:
- home.php: the homepage template
- single.php: the template for single posts
- page.php: the template for pages
- category.php: the template for category indexes
- author.php: the author template, used when someone wants to find all posts by a certain author
- date.php: the date template, used when someone tries to look at for instance a certain month of posts on your blog
- archive.php: this template is used when either category.php, author.php or date.php isn't there.
- search.php: used when someone searches on your blog, a very important template to look at if you're concerned about usability, and whether people are able to find posts on your blog.
- 404.php: Used when WordPress can't find a certain post or page, this is a very important template file to have!
-
Is your theme widgetized?
WordPress supports the use of widgets for your sidebar, this allows you to control what appears in your sidebar from the WordPress admin panel, without having to edit your theme. By now, every WordPress theme should support this, but I still encounter themes which do not support it.
You can determine whether your WordPress theme is widgetized by opening the sidebar.php file in your theme folder, and checking whether the following code is in there somewhere:
dynamic_sidebar('');. There could optionally be text in between those quotes, as long as the dynamic_sidebar part is there, your theme is widgetized.If your theme is not widgetized, Automattic has a great tutorial on how to do that.
-
Does your theme have a search option?
You wouldn't believe it, but there are WordPress themes that do not have a search box built in. Make sure yours does.
-
Does your theme work in all browsers?
Usually, themes come with a demo site. What you should do, is go to browsershots, and put the URL that's in the link to the demo site in to it. Then wait a while, and you'll get screenshots of all major browsers on all platforms, and you can check whether your theme works everywhere, or not.
It's not the biggest of deals if it doesn't work in a "small" browser, but if it doesn't work on Internet Explorer 6 and 7, Firefox and Safari on all platforms, you should be thinking twice about whether this new theme is the best choice for your blog. After all, you don't want to exclude certain groups of people from reading your blog, do you?
-
Is the theme's code valid?
Many a theme author is more of a designer than a coder, and thus they sometimes hack around until it finally looks the way they want, without bothering to check whether the code they've written is actually valid HTML. If it's not, current or future browsers might have issues rendering the content correctly. You can check whether the code is valid by using the W3C's validator. Lorelle wrote an excellent article on the benefits of compliance.
-
Check the outgoing links!
A lot of theme authors will add a link to themselves in the footer of the theme, others might even add multiple links. Certain SEOs have gone as far as paying theme designers to build designs, and spreading those for free, just to be able to add links to their sites in the footer. Because of that, you need to check what your theme will have you link to.
The best tool for this is Dave Naylor's Keyword Density tool, which provides you with a nice list of all links in your theme and their anchor text. It finds two different kinds of links, follow, and nofollow. Nofollow links are NOT counted by search engines, and thus won't affect your site in any way.
Follow links are counted by the search engines though, and you should be aware of what you are linking too, as linking to spammy sites might get your own site penalized! Thus, if you're newly chosen theme is linking to any sites that look weird to you, or very commercial, see if you're allowed to remove those links, and if not, chose another theme!
-
Can the theme handle pages?
If you use pages in your layout, it's important to know whether your theme will automatically add links to them, and whether it can hold pages a few levels deep. You wouldn't be the first to "lose" some of your pages just by going to a new layout.
-
Make sure your theme supports trackbacks
People who blog about you, or your blog will try to automatically send trackbacks to you. To be able to do that, your site needs to have it's trackback information listed somewhere. This doesn't have to be visible though, all you have to make sure is that before the
endwhile;in your single.php and page.php template files, there's a line like this:<!-- <?php trackback_rdf(); ?> -->
-
How is your theme handling titles?
You should check how your current theme is handling page titles in the file header.php. You can find it within the
<title>HTML tags. If the title tag differs, you might want to check out why and what happens when you enable your new theme. Sometimes it's for the better (for instance because it turns around blog description and page / post title), but you have to make sure up front!It will probably look something like this:
<title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>If it does, you'll be a lot better off by changing it around to:
<title><?php wp_title(); ?> <?php bloginfo('name'); ?></title>You can also chose to just do
wp_title('');, and take care of all the titles with a plugin like Headspace2.
If your theme does all of this correctly, you should be quite ok. Good luck with your new theme, and if you have any tips on other things to check, please share in the comments!






This post couldn't have been published at a better time, as I'm just contemplating making a theme change to one of my blogs. One quick question, though...you indicate in section 2 that you should make sure the new theme includes a "home.php" file. Does it make a difference whether that file is "home.php" or "index.php"? Just curious.
I have already checked my current theme and found the <!-- --> missing from my "single.php" and "page.php" files. Thanks to your post, I have since fixed that. Thanks! :)
@SEOAly: well now they don't HAVE to be there, only consider what happens if your current theme has got it, and your new one doesn't, if your current one doesn't: no problem!
Great checklist, Joost. I think the Thesis theme checks out okay, but you've give me a good list of things to look into. I'm going to go through your list tonight just in case I find anything I should tell Chris about before Thesis 1.2 get released. Thanks.
P.S. Looking forward to hearing about your first day at the new job tomorrow. :-)
Great post Joost as always !
@Patrick K. O'Brien: I've got a post coming up reviewing thesis :)
@Magnus Jepson: Thx!
@Joost de Valk: I've changed from themes using "index.php" to themes using "home.php" without any apparent issues in the past. Just curious as to your experience, since you mentioned the "home.php" file specifically in the post. :)
Great Post Joost. WVEry helpful since i am redesigning my website and just started with a new theme. Thanks.
@SEOAly: good to hear that :) your mileage may differ though :)
@filontheroad: glad to be of service!
Check the theme carefully and never ever ever ever download from a 'free' themes site found on a google adwords ad. They are all compromised to insert links, see That story tells you what can happen if you dont!
@Joost de Valk: Thanks again for the post! It may not have been an issue before, but armed with this knowledge I'll be better equipped to troubleshoot future issues. Kudos! Much appreciated. Rae is right...you really ARE a WordPress guru. ;)
@SEOidiot: Thanks, very true!
@SEOAly: as said: my pleasure :)
@Joost de Valk: I shall be interested to read that post; I've been contemplating moving to Thesis recently -- added to feed reader so I don't miss it.
A great post, very helpful. I shall bear what you say in mind as I peruse a few themes. Thank you.
Oh, I don't have home.php, date.php, author.php and category.php!
I think I should improve my (very own) theme for search and archives.
Thanks for this very nice post!
The template files issue is not usually important as long as the user knows how to use conditional statements. Most themes only have minor differences between the various template files anyway. Personally I don't like having lots of template files as it makes altering the theme annoying as you have to go edit a whole bunch of files just to make simple changes. My own themes usually only have one file, index.php. My next theme release for the public will have a full suite of template files though as some people prefer it that way, or maybe I'll give the option of all in one file, or all seperate ... I don't know, I'll decide later :)
I'm wishing I had done more checking before I just switched to my new theme, but it's pretty good. It looks horrible in Opera, but I guess I can deal with that. There are a couple of things that I still haven't figured out, and I build websites so I'm kind of embarrassed I can't figure it out, but I'll get there eventually.
I'm working on an updated theme, so this is a handy reminder of things not to forget. :)
Great post, and extremely helpful and timely :) Thanks for all the pointers!
I wish I had read this post before changing my theme (I know the post wasn't written but anyway....). I'm now left with two choices. 1) change to a new theme or 2) create some heavy modifications. :(
Very useful post ! Seems you read in my mind because i was wondering how to do by myself a wp theme, thanks !
Hey, I love your weblog design it is the best i have seen. Which template did you use? Or if you dont use a template which one can you recommend? Most templates look very boring and cheesy.
I want to have such a great functionality.
THx
Good post. It's also a good checklist of things to keep in mind for theme developers to remember.
Hey Joost it is really cool article. Very useful for developers :)
@Joost de Valk: Thank you for this fantastic post! I only have one question: You have a great post on SEO-ing your blog, but do you have a post on how to build a SEO theme? It seems that free SEO Wordpress Themes are the rage these days. See here and here to see what I am talking about. I am just wondering what makes these themes naturally SEO while other themes are not. Any ideas on the subject would be greatly appreciated. ~Paul
Precisamente en este momento estoy en la fase de planeación de un theme. Este post me ha hecho considerar puntos que desconocÃa. Saludos
Very nice post, I am slowly falling in love with your blog and your wordpress plugins.
Good pointers there.
One more thing to watch, especially on Brian Gardner's Revolution Themes, is the language meta. On quite a few of his themes he has the language meta set to 'en' and also 'sv' .. ?
Thank you Joost!
I haven't checked my RSS for a while, and I was glad to see this post. Appreciate the help :)
Great post with some really nice tips. I didn't know most of this myself.
Nice post, man, more like this please
Cheers for this! 10 things to tick off when I design my next template.
Particuarly like snippet 10, devil is in the details!
Onlye 10 Checks ? we want more !!
Thanks
Only 10 Checks ? we want more !!
Thanks
re: #4: Why do WP theme designers have to include a search option as part of the theme? You can easily include search in a widget. This is handy if you want to pimp your search box with Ajax elements of whatever.
@SEOaly: On a theme I am rejigging there was only an index.php. I added a home.php so that my home page could have slight differences from my inside pages - like a featured content gallery. It wasn't hard to do. I simply copied index.php, renamed it home.php and then added the code for the gallery there.
Great post though!
Great post - I change themes quite often and am never sure what to look for. In fact just recently a new theme broke by WP stats and a google search revealed the footer hook was missing from the theme. Now I can see what else I need to check for!
Thanks
Nice information !!! I'm still looking for many sources about wordpress .Thanks
great post, I have learned many of these things by trial and error. I see a theme and think - wow - what a great looking theme. but as I customize I realize that it is just a hack.
One more tip I might suggest to add, is to look at the quality of the CSS file, if it is short and easy to understand, great. however if it is very very long and cryptic, it will be very hard to customize.
thanks for the great post.
Thanks for the tips. My first go at blogging hasn't been very smooth...
Thanks...good post. I always hav trouble to change my themes
Joost, this is a great list for checking a new theme. However one might run into problems if it is a premium theme where you don't have access to the files. Secondly I've just realized that there are still designers creating themes without using h1 and h2 tags (which I find very strange).
Furthermore I've also recently found that a lot of plugins don't work (i.e. the no-follow / SEO plugins) if the theme uses "wp-list_cats" and "get_archives" as you mention in: http://yoast.com/wordpress/meta-robots-wordpress-plugin/
I know that these things will mess up the "10" things list but they're still important don't you think?
P.S. And it's not because I've only found second hand designers *lol* (well... you might argue about that...)
Ðе пора бы вам начать монетизировать ваш блог?
I partly disagree on the importance of code validity. The validator often times gives false readings. Too often it tells me terminating > aren't present but if you do a view source code through your browser of the page it claims to check the closing > are there. It also has problems with different installs of WordPress and some servers/hosting companies. For example I can run a theme check on a blank wordpress install and get very different errors from zyon, host gator, bluehost, dream host, and dot 5. Most of them are trivial telling me this or that tag isn't closed, or their is a space, but it still counts it as an error and does it differently from server to server.
In my opinion you should strive for the best compliance you can, then check it out for yourself running a real browser check to make sure it works.
Trying this check-list against the templates output by Artisteer.com.
They seem to pass on most but fail on the widgetized, dynamic_sidebar() function.
Any thoughts on this or other theme generators?
Thanks for this article, it actually helped me alot... but not for chosing a wordpress theme. It made me realise why my titles were all messed up on my current theme! I was using headspace, but my code was pulling in other bits of title too within the title tag. Thanks,
Yes great post and these are things all Wordpress users should note. especialy the ones with designers. Alot of themes are really just made for looks and not functionailty.
Just came across this post and it is very useful for me as a Wordpress theme designer. I have more than 15 themes in my portfolio. I'll check my themes against every item and see if I did as you suggested :)
Great post. Will have to check my blogs and future templates that we create against this list.
Keep up the great posts! I am now following you on twitter.
MC