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.

Perfect WordPress ThemeIf 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:

  1. 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:

    1. In header.php, it should have a small piece of PHP code that looks exactly like this wp_head(); or this do_action('wp_head');, usually just before a piece of HTML that looks like this: </head>.
    2. In footer.php, it should have another small piece of PHP like this wp_footer();, or this do_action('wp_footer');
    3. 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.
  2. 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!
  3. 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.

  4. 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.

  5. 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?

  6. 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.

  7. 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!

  8. 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.

  9. 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:

    &lt;!-- &lt;?php trackback_rdf(); ?&gt; --&gt;
  10. 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:

    &lt;title&gt;&lt;?php bloginfo('name'); ?&gt; &lt;?php wp_title(); ?&gt;&lt;/title&gt;

    If it does, you’ll be a lot better off by changing it around to:

    &lt;title&gt;&lt;?php wp_title(); ?&gt; &lt;?php bloginfo('name'); ?&gt;&lt;/title&gt;

    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!

Tags:


Yoast.com runs on the Genesis Framework

Genesis theme frameworkThe Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides you with the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Read our Genesis review or get Genesis now!

102 Responses

  1. SEOAlyBy SEOAly on 30 September, 2008

    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! :)

  2. Joost de ValkBy Joost de Valk on 30 September, 2008

    @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!

  3. Patrick K. O'BrienBy Patrick K. O'Brien on 30 September, 2008

    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. :-)

  4. Magnus JepsonBy Magnus Jepson on 30 September, 2008

    Great post Joost as always !

  5. Joost de ValkBy Joost de Valk on 30 September, 2008

    @Patrick K. O’Brien: I’ve got a post coming up reviewing thesis :)

    @Magnus Jepson: Thx!

  6. SEOAlyBy SEOAly on 30 September, 2008

    @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. :)

  7. filontheroadBy filontheroad on 30 September, 2008

    Great Post Joost. WVEry helpful since i am redesigning my website and just started with a new theme. Thanks.

  8. Joost de ValkBy Joost de Valk on 30 September, 2008

    @SEOAly: good to hear that :) your mileage may differ though :)

    @filontheroad: glad to be of service!

  9. SEOidiotBy SEOidiot on 30 September, 2008

    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!

  10. SEOAlyBy SEOAly on 30 September, 2008

    @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. ;)

  11. Joost de ValkBy Joost de Valk on 30 September, 2008

    @SEOidiot: Thanks, very true!

    @SEOAly: as said: my pleasure :)

  12. ...paulBy ...paul on 30 September, 2008

    @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.

  13. pickupjojoBy pickupjojo on 30 September, 2008

    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!

  14. RyanBy Ryan on 1 October, 2008

    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 :)

  15. MitchBy Mitch on 1 October, 2008

    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.

  16. Stuart | Design MemeBy Stuart | Design Meme on 1 October, 2008

    I’m working on an updated theme, so this is a handy reminder of things not to forget. :)

  17. MarkBy Mark on 1 October, 2008

    Great post, and extremely helpful and timely :) Thanks for all the pointers!

  18. Mikael RieckBy Mikael Rieck on 2 October, 2008

    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. :(

  19. yvonhBy yvonh on 2 October, 2008

    Very useful post ! Seems you read in my mind because i was wondering how to do by myself a wp theme, thanks !

  20. BenjiBy Benji on 2 October, 2008

    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

  21. Kevin DayBy Kevin Day on 2 October, 2008

    Good post. It’s also a good checklist of things to keep in mind for theme developers to remember.

  22. ReferátyBy Referáty on 2 October, 2008

    Hey Joost it is really cool article. Very useful for developers :)

  23. HatlessSEOBy HatlessSEO on 3 October, 2008

    @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

  24. christianBy christian on 5 October, 2008

    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

  25. AmitBy Amit on 6 October, 2008

    Very nice post, I am slowly falling in love with your blog and your wordpress plugins.
    Good pointers there.

  26. top 10By top 10 on 8 October, 2008

    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’ .. ?

  27. seosurvivorBy seosurvivor on 8 October, 2008

    Thank you Joost!

    I haven’t checked my RSS for a while, and I was glad to see this post. Appreciate the help :)

  28. Julius Kuhn-RegnierBy Julius Kuhn-Regnier on 10 October, 2008

    Great post with some really nice tips. I didn’t know most of this myself.

  29. LogoBy Logo on 19 October, 2008

    Nice post, man, more like this please

  30. Richard Spencer DaviesBy Richard Spencer Davies on 23 October, 2008

    Cheers for this! 10 things to tick off when I design my next template.

    Particuarly like snippet 10, devil is in the details!

  31. Soy SEOBy Soy SEO on 26 October, 2008

    Onlye 10 Checks ? we want more !!
    Thanks

  32. Soy SEOBy Soy SEO on 26 October, 2008

    Only 10 Checks ? we want more !!
    Thanks

  33. ckBy ck on 27 October, 2008

    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!

  34. ClareBy Clare on 29 October, 2008

    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

  35. erickBy erick on 2 November, 2008

    Nice information !!! I’m still looking for many sources about wordpress .Thanks

  36. Deryk WenausBy Deryk Wenaus on 6 November, 2008

    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.

  37. UToggerBy UTogger on 15 November, 2008

    Thanks for the tips. My first go at blogging hasn’t been very smooth…

  38. SaraBy Sara on 18 November, 2008

    Thanks…good post. I always hav trouble to change my themes

  39. Mikael RieckBy Mikael Rieck on 18 November, 2008

    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…)

  40. SEOBy SEO on 3 December, 2008

    Не пора бы вам начать монетизировать ваш блог?

  41. BradBy Brad on 18 March, 2009

    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.

  42. AndrewBy Andrew on 23 March, 2009

    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?

  43. Leadership ExpertBy Leadership Expert on 7 April, 2009

    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,

  44. Jonathan MarkBy Jonathan Mark on 11 April, 2009

    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.

  45. BrianBy Brian on 4 May, 2009

    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 :)

  46. Mergen ChuluunBy Mergen Chuluun on 6 May, 2009

    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

  47. JonathonBy Jonathon on 10 July, 2009

    Great post, I have been using it as a guide to theme creation. Great starting point, and wonderful tool. Give yourself a pat on the back.

  48. dserdBy dserd on 14 August, 2009

    The validator often times gives false readings. Too often it tells me terminating.

  49. a_usmanBy a_usman on 20 August, 2009

    what is the use of this code? <!– –> is it still required in new wordpress??? I dont see any difference without it although after reading this article I have included this code in my blog.

  50. sterndalBy sterndal on 3 September, 2009

    hello

    i just noticed that my blog isn’t accepting trackbacks

    thanks for sharing the code for that

    great post!

  51. Svetainiu kurimasBy Svetainiu kurimas on 13 October, 2009

    Use some of this stuff and benefited from it. Thanks for this advice.

Trackbacks

  1. [...] What Makes a Perfect WordPress Theme? – Joost de Valk has written a terrific post about what makes a perfect WordPress theme.   Some of it is common sense stuff, but there is a few things people don’t always think about and it is a lot of information collected into one post. [...]

  2. [...] The Perfect WordPress Themes – Joost de Valk wrote an excellent post diving into the aspects of what makes the perfect WordPress theme. The post covers topics such as hooks, template files, widget support, browser compatibility, looking for outgoing links and more. This is a great article to read as you can develop your own check list to use when browsing for a new WordPress theme. – http://yoast.com/perfect-wordpress-theme/ [...]

  3. 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 loo…

  4. 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 loo…