Most recently, this was in the form of recipe meta-data, such as ingredients or cooking time. If you’re running a WordPress blog based around reviews of anything then adding semantic markup is easy.

However, you may find your chosen blog theme is throwing a few errors, so let’s take a look at a suitable plugin and how to deal with some of the errors you might see.

GD StarRatings:

If you do any kind of reviews on your blog, GDStarRatings is an absolute must-have plugin, and I’ve been using it right from the start on my iPad Board Games site to allow readers to rate games they’ve played.

This plugin has been around along time and the developers were thoughtful enough to include Rich Snippet markup since last year. Unlike the new Recipe micro-format, the markup and rules for reviews has long been established, so the plugin itself produces well formatted review code without any Google validation errors.

Let’s take a quick look at installing and getting the plugin set up, as it can be a little daunting with all the options available to you. First, let’s download it from within the WordPress interface.

After activation, by default the plugin adds a rating block, a thumbs-up bloc, and comment ratings.

Let’s disable some of those that we don’t need. Expand the new ratings section on your admin sidebar, and click on Settings. Start by disabling the “thumbs-up” ratings by clicking on the green thumbs-up icon next to the word article (check out the screenshot). Deselect all the options for Auto-insert ratings code, and that should remove them.

I went ahead and did the same for all other auto-inserted ratings blocks except for the main article star rating which is the only one I want.

After running through the testing tool, you may find some more errors as I did, but these will be related to your individual theme rather than the ratings plugin. For instance, on my theme I found that even such simple semantic information such as “entry-title” wasn’t being added. To fix these, you will need to know a little HTML.

Warning: Missing required field “entry-title”.

Warning: Missing required field “updated”.

Warning: Missing required hCard “author”.

Open up the theme folder of your blog, located at wp-content/themes/(name of theme) if you’re going through FTP, or from the WordPress admin screen, expand the Appearance sidebar item and go to Editor.

Open up single.php in your favorite text editor, or just click on the single.php to the left of the editor screen from within WordPress.

First up, Google told us we were missing an entry-title. Hit Find in your browser or editor and look for the_title(). Your can see it’s surrounded by an H2 tag, and in my case with the class=”post_title” applied to it.

We want to add the entry-title class to it too, so in my case I simply added that into the class definition of the H2:

Just below that, Google tells us we are also missing something about when the post was updated. I already have a class=”date” definition, so I simply add “updated” into that one too:

Finally, I’m missing the author information. For now I’ll add it just after the published date. If you already have some code for the_author() somewhere, just surround it with the same span tags as I’ve added below. This tells Google who the author is, their name, and encloses the whole thing in a vcard.

Now, checking the page again I see all the errors have been fixed.

As a final step, I’m going to submit my site for Google to start drawing rich snippets from – it won’t necessarily happen automatically, so you need to fill out the form here and Google will consider you for inclusion.

Recipes in WordPress?

There are also a few plugins for adding recipe microformats, however at the time of writing Google had updated their microformat style and neither plugin produced valid results. If you are publishing recipes on your blog, I’d suggest you keep an eye on both hRecipe and RecipeSEO plugins, which I’m sure will be updated soon to reflect the recent format changes.

Conclusion and further reading:

Adding reviews or recipes Rich Snippet data is easy with GDStarRatings, but if your theme isn’t already compatible for the additional author and post meta-data needed, then you may find Google is unwilling to list your site. If you’re getting the same errors as I did, then follow the code tutorial carefully and be sure to make a backup the file in case you make a typo. Next week I’ll begin a series of articles looking in depth at creating a wordpress theme and the structure of themes so you can edit your own a little more, but for now if you’re still getting Rich Snippet errors then feel free to ask a question on the Q&A forum, or post in the comments below, and I’ll do my best to fix them for you.

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

Comment

Name *

Email *

Neil

May 13, 2011 at 4:24 pm

This is an awesome article @muo_jamesbruce:disqus thank you for sharing this excellent information and making it really easy to understand. Trying to work this out from Google's official site is a nightmare!

I dont think that's entirely true, Jon. If you have quality content, and Google decides you are worthy of being included as rich snippets, it will include you. It's about the quality of content, not size of site or traffic it currently recieves. Eventually, Google will roll-out these changes to be automatic to any site that includes them, at which point anyone with them will most definitely be at an advantage.

hey, you could also use polldaddy, an automattic product for this. their wordpress plugin has the rating feature too. i dont know about how it acts with google, but it displays 5 star ratings or up and down ratings on every post and comment and page. you can control on where to show it.

Have considered these, but ultimately the content is not stored on your site. Instead, you get an embed code. If polldaddy ever goes down, or stops working, everythign is lost. So I'd pretty advise against any hosted solutions such as that.

Thanks for this amazing article! I had always been wonderings about getting stars in my wordpress articles. I tried gdstarratings, but ditched it due to the learning curve on perfecting it. I'm curious... How do you display the star ratings in the excerpts on your blog homepage?

Anyways, I'd love to see more articles like this. Maybe a wordpress plugin/theme weekly roundup, similar to your cool websites and 10 free albums weekly articles.

Apologies for the incredibly late reply, got lost in my inbox mountain.

To display ratings in the excerpt, you'll need to use GD-StarRating "builder" to make a custom bit of PHP code for article-> star ratings. Then open your index.php (or archives.php, depending on where you want this to display), and insert the snippet you got from builder just after (or similar).

Hope you get on ok, it's difficult without knowing your exact theme.

As for a regular column - done! I'll start on one today! May be monthly though~

Thanks for this amazing article! I had always been wonderings about getting stars in my wordpress articles. I tried gdstarratings, but ditched it due to the learning curve on perfecting it. I'm curious... How do you display the star ratings in the excerpts on your blog homepage?

Anyways, I'd love to see more articles like this. Maybe a wordpress plugin/theme weekly roundup, similar to your cool websites and 10 free albums weekly articles.

James has a BSc in Artificial Intelligence, and is CompTIA A+ and Network+ certified. He's the lead developer of MakeUseOf, and spends his free time playing VR paintball and boardgames. He's been building PCs since he was a kid.