<?xml version="1.0" encoding="utf-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:media="http://search.yahoo.com/mrss/"
><channel><title>YoastMicroformats - Archives - Yoast - Tweaking Websites</title> <atom:link href="http://yoast.com/tag/microformats/feed/" rel="self" type="application/rss+xml" /><link>http://yoast.com</link> <description>Tweaking Websites</description> <lastBuildDate>Mon, 06 Sep 2010 07:27:28 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator> <image><title>Yoast</title> <url>http://cdn.yoast.com/wp-content/themes/yoast-v2/images/yoast-logo-rss.png</url><link>http://yoast.com</link> <width>144</width> <height>103</height> <description>Tweaking Websites</description> </image> <item><title>hreview and hproduct in Magento</title><link>http://yoast.com/rich-snippets-magento/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rich-snippets-magento</link> <comments>http://yoast.com/rich-snippets-magento/#comments</comments> <pubDate>Wed, 26 May 2010 15:01:57 +0000</pubDate> <dc:creator>Joost de Valk</dc:creator> <category><![CDATA[Magento]]></category> <category><![CDATA[hproduct]]></category> <category><![CDATA[hreview]]></category> <category><![CDATA[Microformats]]></category> <category><![CDATA[rich snippets]]></category> <category><![CDATA[SEO]]></category><guid
isPermaLink="false">http://yoast.com/?p=2302</guid> <description><![CDATA[<p>Today I gave a presentation at Meet Magento in the Netherlands, talking about SEO for Magento. Up until this point, all articles about that subject here on Yoast have been written by my colleague Joachim Houtman. Last week though, I started playing with Magento myself, in preparation for this presentation today, and I've added some [...]</p><p><a
href="http://yoast.com/rich-snippets-magento/">hreview and hproduct in Magento</a> is a post from <a
href="http://yoast.com/about-me/">Joost de Valk</a>&#39;s <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></description> <content:encoded><![CDATA[<p>Today I gave a presentation at <a
href="http://www.meet-magento.nl/">Meet Magento</a> in the Netherlands, talking about SEO for Magento. Up until this point, all articles about that subject here on Yoast have been written by my colleague <a
href="http://yoast.com/author/joachim/">Joachim Houtman</a>. Last week though, I started playing with Magento myself, in preparation for this presentation today, and I've added some things to our <a
href="http://yoast.com/articles/magento-seo/#seotemplate">Blank SEO Template</a> that I know some of you will enjoy.</p><p>What I've done is I've added both <code>hreview</code> and <code>hproduct</code> microformats to our template. I'll briefly walk you through how to do that. It might be wise to start with Frederick's post on <a
href="http://yoast.com/google-microformats-conversion-rate-optimization-serps/">Driving more traffic from Google through Microformats</a>. After that you can read my own post on how to implement <a
href="http://yoast.com/implement-hreview-wordpress-theme/">hreview in WordPress</a> or read on to see how to implement hreview-aggregate in Magento.</p><h2 id="hreview">Adding hreview in 5 steps</h2><h3 id="hreview-wrapper">Step 1: the 'hreview-aggregate' class</h3><p>Because we've got more than one review for products, we're going to be using the <code>hreview-aggregate</code> version of the microformat. This wrapper class should be on an element that contains all the elements of the review. So we open:</p><pre><strong>template/catalog/product/view.html</strong></pre><p>And add the class <code>hreview-aggregate</code> to the <code>product-shop</code> div.</p><h3 id="item">Step 2: the "item" reviewed</h3><p>The second thing we should add is the item being reviewed, we'll use two classes here: <code>item</code> and <code>fn</code>. I've added this to the &lt;h1&gt; within the product-name class, still in the same file. So far, what we've got looks like this:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;product-shop hreview-aggregate&quot;&gt;
  &lt;div class=&quot;product-name&quot;&gt;
    &lt;h1 class=&quot;item name fn&quot;&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$_helper</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">productAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_product</span><span style="color: #339933;">,</span> 
          <span style="color: #000088;">$_product</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
          <span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span> 
    <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/h1&gt;
  &lt;/div&gt;</pre></div></div><h3 id="rating">Step 3: the rating</h3><p>Then you'll see a call like this:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getReviewsSummaryHtml</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_product</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div><p>This calls to a template file that's hidden in:</p><pre><strong>/template/review/helper/summary.phtml</strong></pre><p>If you open this file you'll see a div called <code>rating-box</code>, containing a div called <code>rating</code>. Because this box outputs the rating visually using CSS, we'll need to make it machine readable as well. Luckily, there's a solution for that: we'll use the <code>value-title</code> method. Within the contents of the div with class <code>rating</code>, we'll add this:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;span 
  class=&quot;value-title&quot; 
  title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #990000;">number_format</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getRatingSummary</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
&lt;/span&gt;</pre></div></div><p>As you can see, we retrieve the rating and turn it into a 5 point scale rating by dividing it by 20, so Google can understand it.</p><h3 id="count">Step 4: the review count.</h3><p>Next we have to tell Google how many reviews we've had for this product. In a span in the same file with the class <code>amount</code>, you'll find this info. I had to redo the code a tiny bit, it ended up looking like this (formatted for readability):</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
  <span style="color: #990000;">echo</span> <span style="color: #0000ff;">'&lt;span class=&quot;count&quot;&gt;'</span><span style="color: #339933;">;</span>
  <span style="color: #990000;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getReviewsCount</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #990000;">echo</span> <span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' Review(s)'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div><p>So with the span <code>count</code> it only shows the number, the text "Review(s)" is actually outside of it. Otherwise Google wouldn't understand it.</p><h3 id="pricerange">Step 5: The pricerange</h3><p>This last step actually caused me a bit more headaches, even though the end result is quite simple. We need to add the <code>pricerange</code> class to our price "tag", in order for Google to understand the pricing of our product. To do this, we open up:</p><pre><strong>/template/catalog/product/price.phtml</strong></pre><p>This is one big file, but don't get scared: there are two divs there with class <code>price-box</code>, just add the <code>pricerange</code> class there and you'll be ok, and quickly close that file before that code get's to your head!</p><h2 id="hproduct">Adding hproduct to your template</h2><h3 id="hproduct-wrap">Step 1: The hproduct class</h3><p>Open up view.phtml again:</p><pre><strong>/template/catalog/product/view.phtml</strong></pre><p>The <code>hproduct</code> class needs to go up in the source a bit higher than the <code>hreview</code> class, easiest way is to add it to the div with class <code>product-view</code>.</p><h3 id="availability">Step 2: Availability</h3><p>The <code>fn</code> is already there because of our hreview implementation, so we can go right to <code>availability</code>. To add the proper classing open up:</p><pre><strong>/template/catalog/product/view/type/simple.phtml</strong></pre><p>You'll see that the class in there is already called <code>availability</code>. It's there twice: for in stock and out of stock occasions. The full code I made out of that uses the <code>value-title</code> method, and looks like this:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_product</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isSaleable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;p class=&quot;availability in-stock&quot;&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Availability:'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> 
    &lt;span class=&quot;value-title&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'In stock'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'In stock'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/span&gt;
  &lt;/p&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;p class=&quot;availability out-of-stock&quot;&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Availability:'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;span class=&quot;value-title&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Out of stock'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Out of stock'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/span&gt;
  &lt;/p&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div><p>Now I'll be honest: I have second thoughts about giving Google availability data for products. If Google were to act in the best interest of it's endusers, it would <em>not</em> show you in the rankings for a particular product when there were other sites that carried the same product that indicated they do have stock. So, use this part of hproduct with some prejudice.</p><h3 id="photo">Step 3: The product photo</h3><p>Next up is the product photo. Open up:</p><pre><strong>/template/catalog/product/view/media.phtml</strong></pre><p>You'll see an <code>img</code> element with the id <code>image</code>, give it two classes: <code>photo</code> and <code>fn</code>. Some microformats parsers might have issues with using the fn from the <code>hreview</code>, and since this image contains the exact same title as an alt tag, adding the <code>fn</code> class here will help those parsers.</p><h3 id="price">Step 4: Price</h3><p>This step is easy: the default theme already has the class <code>price</code> around the price everywhere, so just leave it as is and you're good, otherwise, open up <em>price.phtml</em> and add it in.</p><h3 id="brand">Step 5: Brand</h3><p>The last step to our <code>hproduct</code> completion is to add the brand. Open up:</p><pre><strong>/template/catalog/product/view/attributes.phtml</strong></pre><p>We'll use the fact that brand is an internal attribute name in Magento as well for this. Where it has a <code>td</code> with class <code>data</code>, change it into this:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;td class=&quot;data <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #990000;">strtolower</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'label'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;</pre></div></div><p>By doing this all the data cells will have a proper class name, one of which will be <code>brand</code>, completing our <code>hproduct</code> microformat!</p><h2 id="presentation">My presentation from Meet Magento</h2> <object
width="562" height="461"><param
name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=magentoseo-en-slideshare-100526103553-phpapp01"/><param
name="allowFullScreen" value="true"/><param
name="allowScriptAccess" value="always"/><embed
src="http://static.slideshare.net/swf/ssplayer2.swf?doc=magentoseo-en-slideshare-100526103553-phpapp01"  type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="562" height="461"></embed></object><h2 id="summary">Microformats in Magento</h2><p>So if you've followed the steps above, you should now have a nicely microformatted product page. Use <a
href="http://www.google.com/webmasters/tools/richsnippets">Google's Rich Snippets testing tool</a> to test it, and have a lot of fun using it!</p><h2 id="download">Downloading the updated template</h2><p>You can <a
href="http://www.magentocommerce.com/magento-connect/Yoast/extension/974/yoast-blank-seo-theme">download the updated template from Magento Connect</a>.</p><p><a
href="http://yoast.com/rich-snippets-magento/">hreview and hproduct in Magento</a> is a post from <a
href="http://yoast.com/about-me/">Joost de Valk</a>&#39;s <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></content:encoded> <wfw:commentRss>http://yoast.com/rich-snippets-magento/feed/</wfw:commentRss> <slash:comments>24</slash:comments> </item> <item><title>Implementing hreview in your WordPress theme</title><link>http://yoast.com/implement-hreview-wordpress-theme/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=implement-hreview-wordpress-theme</link> <comments>http://yoast.com/implement-hreview-wordpress-theme/#comments</comments> <pubDate>Sun, 28 Feb 2010 14:00:49 +0000</pubDate> <dc:creator>Joost de Valk</dc:creator> <category><![CDATA[WordPress]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[hreview]]></category> <category><![CDATA[Microformats]]></category> <category><![CDATA[review]]></category> <category><![CDATA[rich snippets]]></category> <category><![CDATA[WordPress Themes]]></category><guid
isPermaLink="false">http://yoast.com/?p=2057</guid> <description><![CDATA[<p>In his previous post here on Yoast, Frederick explained why you should use Microformats to increase the CTR from Google. In the comments of that post, people were asking if there are plugins to easily implement this in your theme. While those are probably a bit hard to do, I though it would be good [...]</p><p><a
href="http://yoast.com/implement-hreview-wordpress-theme/">Implementing hreview in your WordPress theme</a> is a post from <a
href="http://yoast.com/about-me/">Joost de Valk</a>&#39;s <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></description> <content:encoded><![CDATA[<p>In his <a
title="Google &amp; Microformats: Drive More Traffic" href="http://yoast.com/google-microformats-conversion-rate-optimization-serps/">previous post</a> here on Yoast, Frederick explained why you should use Microformats to increase the CTR from Google. In the comments of that post, people were asking if there are plugins to easily implement this in your theme. While those are probably a bit hard to do, I though it would be good to explain how I implemented <code>hreview</code> in my theme.</p><h2 id="activate">How I "activate" a review</h2><p>I alluded to it in <a
title="Fireside Chat with Dougal Campbell, An Early WordPress Developer - WordPress Community Podcast" href="http://www2.webmasterradio.fm/wordpress-community-podcast/2010/02/23/fireside-chat-with-dougal-campbell-an-early-wordpress-developer/">last tuesdays podcast with Dougal Campbell</a>: When I add a custom field "rating" to a post, my theme now automatically marks up that post as an <code>hreview</code> microformat. So it's as simple as this:</p><p><a
href="http://cdn.yoast.com/wp-content/uploads/2010/02/rating-custom-field.jpg"><img
class="aligncenter size-full wp-image-2058" title="Rating Custom Field" src="http://cdn.yoast.com/wp-content/uploads/2010/02/rating-custom-field.jpg" alt="Rating Custom Field" width="450" height="130" /></a></p><p>The rating is between 0 and 5, because that way Google understands it best and we don't have to give Google any extra metadata about it.</p><h2 id="echo">The hreview_echo function</h2><p>To make this whole process easy, I've created a function in my <em>functions.php</em> file called <code>hreview_echo</code>. It looks like this:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> hreview_echo<span style="color: #009900;">&#40;</span><span style="color: #000088;">$val</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #990000;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$rating</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'rating'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$rating</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">echo</span> <span style="color: #000088;">$val</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>We'll use this function on the several places where we need to add extra classes to make up the <code>hreview</code>.</p><h2 id="wrapper">The wrapper class: hreview</h2><p>The first class we should add is the wrapper for the entire microformat: the <code>hreview</code> class. This should be on the <code>div</code> surrounding the post (this div should include the title and author). In the default theme (and in mine) it looks like this:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;div <span style="color: #000000; font-weight: bold;">&lt;?php</span> post_class<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> id=&quot;post-<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;</pre></div></div><p>In this case the class of this div is actually put out by the WordPress core <code>post_class()</code> function, so we'll need to hook into that function. Luckily it allows us to easily do that using a filter, which we'll do using the functions below, which you can drop into your <em>functions.php</em> too:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> hreview_post_class<span style="color: #009900;">&#40;</span><span style="color: #000088;">$classes</span><span style="color: #339933;">,</span> <span style="color: #000088;">$class</span><span style="color: #339933;">,</span> <span style="color: #000088;">$post_id</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #990000;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$review</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'rating'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$review</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'hreview'</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$classes</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post_class'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'hreview_post_class'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>If your theme doesn't use the <code>post_class()</code> function, it's even easier! Let's say your post div looks like this:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;post&quot;</span><span style="color: #339933;">&gt;</span></pre></div></div><p>You can just use our <code>hreview_echo()</code> function:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;post<span style="color: #000000; font-weight: bold;">&lt;?php</span> hreview_echo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' hreview'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;</pre></div></div><h2 id="item">The item reviewed: the title</h2><p>Next up in the line of things we have to add a class to is the post title, it needs two classnames: the <code>item</code> and <code>fn</code> classes. In my case it looked like this:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;h1&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h1&gt;</pre></div></div><p>This is easily turned into the following, again using the <code>hreview_echo</code> function we created before:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;h1 <span style="color: #000000; font-weight: bold;">&lt;?php</span> hreview_echo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' class=&quot;item fn&quot;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h1&gt;</pre></div></div><h2 id="date">The date of the review</h2><p>For the date we'll have to work it a bit. The hreview microformat determines the date should be in ISO date format. Meaning the date should look like: 2010-03-01. Your theme probably has another way of showing the date, I know mine does. My date looked like this:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;span class=&quot;date&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'d F Y'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;</pre></div></div><p>Now to make it so that it can still look like that but we can also give the microformat the correctly formatted date, we'll use a trick: by adding a <code>span</code> with a class of <code>value-title</code> and then adding the correct date in the <code>title</code> of that span, microformat parsers will ignore the other content and pick the value from that title.</p><p>So we'll turn it into this:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;span class=&quot;date<span style="color: #000000; font-weight: bold;">&lt;?php</span> hreview_echo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' dtreviewed'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span>
      hreview_echo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;span class=&quot;value-title&quot; title=&quot;'</span><span style="color: #339933;">.</span>
        get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Y-m-d'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;/&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'d F Y'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/span&gt;</pre></div></div><p>This outputs:</p><div
class="wp_syntax"><div
class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;date dtreviewed&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;value-title&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;2010-02-10&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  10 February 2010
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div><p>That's a nice, non-intrusive solution, right?</p><h2 id="author">The reviewer: the author</h2><p>The next class we need to add is the <code>reviewer</code> class, as this is the author of the review, that's a simple one too: it's the author of the post. In my theme, my author block looks like this:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;span class=&quot;author&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_author<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;</pre></div></div><p>Now you'll get by now what we'll do:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;span class=&quot;author<span style="color: #000000; font-weight: bold;">&lt;?php</span> hreview_echo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' reviewer'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_author<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/span&gt;</pre></div></div><p>Easy does it, right? You can basically do something like this with any kind of showing the author's name. Other functions that might be used in your theme are for instance <code>the_author_link()</code> or <code>the_author_posts_link()</code>.</p><h2 id="summary">The content of the review</h2><p>We've done more than half of it now! Let's get going with the contents of the review, in the microformat, this needs the class <code>description</code>.  In my theme, just like in the default kubrick theme, the content is wrapped in the following div:</p><div
class="wp_syntax"><div
class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;entry&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></pre></div></div><p>You've guessed it by now haven't you? Here we go:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;entry<span style="color: #000000; font-weight: bold;">&lt;?php</span> hreview_echo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' description'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;</pre></div></div><p>By the way: if you want to mark up articles on for instance your fronpage as hreview too, and you use excerpts there instead of full articles, like I do, you should use <code>summary</code>, instead of <code>description</code>:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;entry<span style="color: #000000; font-weight: bold;">&lt;?php</span> hreview_echo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' summary'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;</pre></div></div><h2 id="therating">Finally: the rating!</h2><p>And now, finally, it's time for us to add the rating, because that's what it's all about right? There's all sorts of ways to display a rating, I have chosen to do it in HTML that looks like this:</p><div
class="wp_syntax"><div
class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;rating&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>My rating:<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;4.5 out of 5 stars&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;rating_bar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;width:90%&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div><p>Which outputs this:</p><div
class="rating">My rating:</div><div
class="rating_bar" title="4.5 out of 5 stars"><div
style="width:90%"></div></div><p><br
class="clear" /><br
/> The second div (class <code>rating_bar</code>) displays the rating, and it contains the empty stars. The div within that contains the yellow stars, and fills the stars up to where they need to be.</p><p>The CSS for these 3 divs looks like this:</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.rating</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.rating_bar</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">55px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/stars.gif</span><span style="color: #00AA00;">&#41;</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">repeat-x</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.rating_bar</span> div <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/stars.gif</span><span style="color: #00AA00;">&#41;</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">-13px</span> <span style="color: #993333;">repeat-x</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div><p>Download the (sprited) image of the stars <a
href="http://cdn.yoast.com/wp-content/themes/yoast-v2/images/stars.gif ">here</a>.</p><p>Now we'll need to do two things: dynamically output the size of the inner div within <code>rating_bar</code>, and make the rating readable for a microformat parser.</p><p>To display the rating, because it's a value between 0 and 5, we'll multiply it by 20. To make the output parseable by a microformat parser, we'll use the same <code>value-title</code> trick we used before. Finally, we'll turn this all into a function to display the rating, which you can drop into your <em>functions.php</em>, just like the two functions before.</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> display_hreview_rating<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #990000;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$rating</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'rating'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$rating</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;div class=&quot;rating&quot;&gt;
      My rating:
      &lt;span class=&quot;value-title&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$rating</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;/&gt;
    &lt;/span&gt;&lt;/div&gt;
    &lt;div title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$rating</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> out of 5 stars&quot; class=&quot;rating_bar&quot;&gt;
      &lt;div style=&quot;width:<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$rating</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">20</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>%&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div><p>So, now you can just use the <code>display_hreview_rating()</code> function anywhere in your post where you want to display the rating. If there is no rating, it won't display anything.</p><h2 id="testing">Testing your hreview</h2><p>Testing your hreview markup can be done with multiple tools, but I myself found the <a
href="http://www.google.com/webmasters/tools/richsnippets">Google Rich Snippets tool</a> to be extremely useful. If you use <a
href="http://quixapp.com/">Quix</a>, just type 'snippet' on the post you want to test! In my case it outputs a snippet like this for my <a
href="http://yoast.com/easy-blog-backup/">review of a WordPress backup plugin</a>:</p><p><img
src="http://cdn.yoast.com/wp-content/uploads/2010/02/rich-snippet.jpg" alt="Rich Snippet hreview" title="Rich Snippet hreview" width="489" height="89" class="aligncenter size-full wp-image-2082" /></p><h2 id="pricerange">Bonus: pricerange and tags</h2><p>As you can see in the above snippet, it includes something that is not documented anywhere in <a
href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=146645#Individual_reviews">the official Google documentation for reviews</a>, but that Google does support: the pricerange.</p><p>Credit where credit is due: I first found this pricerange attribute when my colleague Eduard pointed me to <a
href="http://seogadget.co.uk/using-hreview-microformat-on-your-review-page/">this post by the SEOgadget guys</a>, which pointed to this <a
href="http://knol.google.com/k/google-rich-snippets-tips-and-tricks">Knol</a>. It's extremely useful and seems to basically allow for all sorts of text. People use it to display a pricerange in a €€ - €€€ style, or to display a "real" pricerange, like € 100 - € 150. In case of an individual review, you can just use it to tell what you paid for it.</p><p>Since what I paid for a product is not a real part of my theme, I just make it simple: when I tell that the plugin is free, I mark up that line as:</p><div
class="wp_syntax"><div
class="code"><pre class="xml" style="font-family:monospace;">this plugin is completely <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;pricerange&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>free<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div><p>If you <em>do</em> want to put the value into a custom field and display it, you could easily adapt one of the functions above to do that, I'll leave <em>that</em> as an exercise to you, the reader.</p><p>Another thing I found that Google recognizes is the class <code>tags</code>. That's <em>really</em> easy to do: I just added the class 'tags' around my tags. I don't know how Google uses that though, haven't seen it anywhere in the wild.</p><h2 id="final">A final note</h2><p>If you've modified your theme to mark up as hreview, please make sure to use <a
href="http://www.google.com/support/webmasters/bin/request.py?contact_type=rich_snippets_feedback">this form</a> to let Google know that you have. They might not show it if you don't fit their test segment though, because as Google states in <a
href="http://knol.google.com/k/google-rich-snippets-tips-and-tricks">the Knol</a>:</p><blockquote><p>Currently, review sites and social networking/people profile sites are eligible. We plan to expand Rich Snippets to other types of content in the future.</p></blockquote><p>I hope you've found this post useful, let me know in the comments if you've used it to add hreview to your (premium) theme, and feel free to post links to examples, I'd love to see them! If you're wondering: all code examples on this site, unless specifically otherwise stated, are MIT licensed: free to distribute, free to modify. Please do add a link to where you got the original code though.</p><p>It's my humble opinion that additions like these should make it into all the premium themes, because that's what <em>really</em> makes a premium theme premium, in my opinion. Happy coding!</p><p><a
href="http://yoast.com/implement-hreview-wordpress-theme/">Implementing hreview in your WordPress theme</a> is a post from <a
href="http://yoast.com/about-me/">Joost de Valk</a>&#39;s <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></content:encoded> <wfw:commentRss>http://yoast.com/implement-hreview-wordpress-theme/feed/</wfw:commentRss> <slash:comments>32</slash:comments> <media:thumbnail url="http://cdn.yoast.com/wp-content/uploads/2010/02/rating-custom-field-125x125.jpg" /> <media:content url="http://cdn.yoast.com/wp-content/uploads/2010/02/rating-custom-field.jpg" medium="image"> <media:title type="html">Rating Custom Field</media:title> <media:thumbnail url="http://cdn.yoast.com/wp-content/uploads/2010/02/rating-custom-field-125x125.jpg" /> </media:content> <media:content url="http://cdn.yoast.com/wp-content/uploads/2010/02/rich-snippet.jpg" medium="image"> <media:title type="html">Rich Snippet hreview</media:title> <media:thumbnail url="http://cdn.yoast.com/wp-content/uploads/2010/02/rich-snippet-125x89.jpg" /> </media:content> </item> <item><title>Google &amp; Microformats: Drive More Traffic</title><link>http://yoast.com/google-microformats-conversion-rate-optimization-serps/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=google-microformats-conversion-rate-optimization-serps</link> <comments>http://yoast.com/google-microformats-conversion-rate-optimization-serps/#comments</comments> <pubDate>Thu, 18 Feb 2010 16:28:13 +0000</pubDate> <dc:creator>Frederick Townes</dc:creator> <category><![CDATA[SEO]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[Conversion Rate Optimization]]></category> <category><![CDATA[Microformats]]></category> <category><![CDATA[rich snippets]]></category> <category><![CDATA[SERPS]]></category><guid
isPermaLink="false">http://yoast.com/?p=1966</guid> <description><![CDATA[<p>Conversion rate optimization is now more of an exact science thanks to Google's adoption of microformats. Maximize the effectiveness of your snippets on search engine result pages.</p><p><a
href="http://yoast.com/google-microformats-conversion-rate-optimization-serps/">Google &amp; Microformats: Drive More Traffic</a> is a post from <a
href="http://yoast.com/about-me/">Joost de Valk</a>&#39;s <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></description> <content:encoded><![CDATA[<p>Anyone that has spent time trying to improve their click through rates (<acronym
title="click through rate">CTR</acronym>) from search engine results pages (<acronym
title="search engine results page">SERP</acronym>s) will tell you that Google algorithmically picks the snippet displayed for a given  page; it's not something you can always control. Unfortunately, Google doesn't always display the snippet that will give you the best conversion rate.</p><p>However, the use of <a
href="http://microformats.org/" target="_blank">microformats</a>, a set of agreed upon <acronym
title="Hyper Text Markup Language">HTML</acronym> conventions used to describe content, can give you more control of the <a
href="http://www.google.com/support/webmasters/bin/answer.py?answer=99170" target="_blank">snippets</a> displayed in Google <acronym
title="search engine results page">SERP</acronym>s. Once your site is properly using <a
href="http://microformats.org/2009/05/15/rich-snippets-microformat-search" target="_blank">rich snippets</a>, you will see them also appear in your <a
href="http://www.google.com/cse/" target="_blank">Google custom search</a> and <a
href="http://www.google.com/sitesearch/" target="_blank">Google site search</a> results, so this technique is definitely worth exploring if you use those tools as well.</p><p>The changes are easy to implement  for <a
href="http://wordpress.org/" target="_blank">WordPress</a>, <a
href="http://www.magentocommerce.com/" target="_blank">Magento</a> and other software, let's  take a look at some use cases based on <a
href="http://microformats.org/wiki/hreview" target="_blank">hReview</a>, <a
href="http://microformats.org/wiki/hcard" target="_blank">hCard</a>, <a
href="http://microformats.org/wiki/hproduct" target="_blank">hProduct</a> and <a
href="http://gmpg.org/xfn/" target="_blank">XFN</a>:</p><h2 id="business">Businesses &amp; Organizations</h2><table
border="0" cellspacing="5" cellpadding="5"><tr><td><em>Property</em></td><td><em>Description</em></td></tr><tr><td>name (fn/org)</td><td>The name of the business. If you use microformats, you should use both fn and org, and ensure that these have the same value.</td></tr><tr><td>url</td><td>Link to a web page on the business's site.</td></tr><tr><td>address (adr)</td><td>The location of the business. Can contain the sub properties street address, locality, region, postal-code, and country-name.</td></tr><tr><td>tel</td><td>The telephone number of the business or organization.</td></tr><tr><td>geo</td><td>Specifies the geographical coordinates of the location. Includes two elements: latitude and longitude. Optional.</td></tr></table><p>Could be marked up as follows:</p><div
class="wp_syntax"><div
class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;vcard&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;fn org&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>L'Amourita Pizza<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
   Located at 
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;adr&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span> 
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;street-address&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>123 Main St<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>, 
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;locality&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Albuquerque<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>, 
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;region&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>NM<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>.
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>   
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;geo&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;latitude&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;value-title&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;37.774929&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;longitude&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;value-title&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;-122.419416&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   Phone: <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;tel&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>206-555-1234<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;http://pizza.example.com/&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;url&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>http://pizza.example.com<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div><p>Learn more about the business and organization markup at <a
href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=146861" target="_blank">webmaster central</a>.</p><h2 id="products">Products</h2><table
border="0" cellspacing="5" cellpadding="5"><tr><td><em>Property</em></td><td><em>Description</em></td></tr><tr><td>brand</td><td>The brand of the product for example, ACME.</td></tr><tr><td>category</td><td>The product category for example, "Books&mdash;Fiction", "Heavy Objects", or "Cars".</td></tr><tr><td>description</td><td>Product description</td></tr><tr><td>name (fn)</td><td>Product name</td></tr><tr><td>price</td><td>Floating point number. Can use currency format.</td></tr><tr><td>photo</td><td>URL of product photo</td></tr><tr><td>url</td><td>URL of product page</td></tr></table><p>Could be marked  up as follows:</p><div
class="wp_syntax"><div
class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;hproduct&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
   Brand: <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;brand&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>ACME<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;category&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Heavy objects<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h1</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;fn&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Large all-purpose anvil<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   On sale for 
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;price&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>$99.95<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>.
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;description&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>If you need an object to drop from a height,
   the classic A23859 anvil from ACME is the way to go.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;http://anvil.example.com&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;url&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Anvil details page<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div><p>Becomes:</p><p><img
src="http://cdn.yoast.com/wp-content/uploads/2010/02/webmasters_146645_individualimage.png" alt="Individual Product" title="Individual Product" width="553" height="95" class="aligncenter size-full wp-image-2030" /></p><p>Learn more about the product markup at <a
href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=146750" target="_blank">webmaster central</a>.</p><h2 id="people">People</h2><table
border="0" cellspacing="5" cellpadding="5"><tr><td><em>Property</em></td><td><em>Description</em></td></tr><tr><td>name (fn)</td><td>Name</td></tr><tr><td>nickname</td><td>Nickname</td></tr><tr><td>photo</td><td>An image link</td></tr><tr><td>title</td><td>The person's title (for example, Financial Manager)</td></tr><tr><td>role</td><td>The person's role (for example, Accountant)</td></tr><tr><td>url</td><td>Link to a web page, such as the person's home page</td></tr><tr><td>affiliation (org)</td><td>The name of an organization with which the person is associated (for example, an employer). If fn and org have the exact same value, Google will interpret the information as referring to a business or organization, not a person.</td></tr><tr><td>friend</td><td>Identifies a social relationship between the person described and another person.</td></tr><tr><td>contact</td><td>Identifies a social relationship between the person described and another person.</td></tr><tr><td>acquaintance</td><td>Identifies a social relationship between the person described and another person.</td></tr><tr><td>address (adr)</td><td>The location of the person. Can have the sub properties street address, city, region, postal-code, and country-name.</td></tr></table><p>Could be marked up as:</p><div
class="wp_syntax"><div
class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;vcard&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
   My name is
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;fn&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Bob Smith<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>,
   but people call me
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;nickname&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Smithy<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>.
   Here is my home page:
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;http://www.example.com&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;url&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>www.example.com<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>.
   I live in
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;adr&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;locality&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Albuquerque<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>,
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;region&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>NM<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   and work as an
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;title&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>engineer<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> at
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;org&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>ACME Corp<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>.
   My friends:
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;http://darryl-blog.example.com&quot;</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;friend&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Darryl<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>,
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;http://edna-blog.example.com&quot;</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;friend&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Edna<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div><p>Becomes:</p><p><img
src="http://cdn.yoast.com/wp-content/uploads/2010/02/webmasters_146676_rspeople.png" alt="People" title="People" width="557" height="95" class="aligncenter size-full wp-image-2031" /></p><p>Learn more about markup for people at <a
href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=146646" target="_blank">webmaster central</a>.</p><h2 id="reviews">Reviews</h2><table
border="0" cellspacing="5" cellpadding="5"><tr><td><em>Property</em></td><td><em>Description</em></td></tr><tr><td>itemreviewed (item)</td><td>The item being reviewed. In microformats, can contain the element name (fn).</td></tr><tr><td>rating</td><td>A numerical quality rating for the item (for example, 4). You can indicate a rating scale by specifying best (default: 5) and worst (default: 1). <a
href="http://www.google.com/support/webmasters/bin/answer.py?answer=172705" target="_blank">More information about review ratings.</a></td></tr><tr><td>reviewer</td><td>The author of the review.</td></tr><tr><td>dtreviewed</td><td>The date that the item was reviewed in <a
href="http://www.w3.org/QA/Tips/iso-date" target="_blank">ISO date format</a>.</td></tr><tr><td>description</td><td>The body of the review.</td></tr><tr><td>summary</td><td>A short summary of the review.</td></tr></table><p>Could be marked up as:</p><div
class="wp_syntax"><div
class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;hreview&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;item&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;fn&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>L’Amourita Pizza<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   Reviewed by <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;reviewer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Ulysses Grant<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> on
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;dtreviewed&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      Jan 6<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;value-title&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;2009-01-06&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>.
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;summary&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Delicious, tasty pizza on Eastlake!<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;description&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>L'Amourita serves up traditional wood-fired   
   Neapolitan-style pizza, brought to your table promptly and without fuss. 
   An ideal neighborhood pizza joint.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   Rating: 
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;rating&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>4.5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div><p>Learn more about markup for reviews at <a
href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=146645" target="_blank">webmaster central</a>.</p><p>Interested in getting started? Well there's no reason not to start using microformats as much as possible already; semantic markup is always good for search engine optimization:</p><ol><li>Update your markup (<a
href="http://validator.w3.org/" target="_blank">make sure it's valid</a>) and use the <a
href="http://quixapp.com/" target="_blank">Quix bookmarklet</a> to check your page, by entering 'snippet' to submit the current page to Google Rich Snippets <a
href="http://www.google.com/webmasters/tools/richsnippets" target="_blank">test tool</a>.</li><li>Getting the “Insufficient data to generate the  preview” error? Then make sure that there are no errors in the markup (go back to step one) or check that you are using enough data to generate the snippet  preview, so check the <a
href="http://microformats.org/wiki/debugging-tools" target="_blank">microformat syntax again</a>.</li><li>Finally, <a
href="http://www.google.com/support/webmasters/bin/request.py?contact_type=rich_snippets_feedback" target="_blank">let Google know</a> that you're an early adopter.</li></ol><p>So who's using microformats in  this and other ways? Brands like <a
href="http://www.google.com/webmasters/tools/richsnippets?url=http://mashable.com/" target="_blank">Mashable</a>, <a
href="http://www.ysearchblog.com/2008/03/13/the-yahoo-search-open-ecosystem/" target="_blank">Yahoo!</a>, <a
href="http://www.google.com/webmasters/tools/richsnippets?url=http://www.yelp.com/biz/christian-louboutin-new-york" target="_blank">Yelp</a>, Technorati, SearchMonkey, <a
href="http://www.google.com/webmasters/tools/richsnippets?url=http://www.linkedin.com/in/w3edge" target="_blank">LinkedIn</a>, <a
href="http://www.google.com/webmasters/tools/richsnippets?url=http://www.urbanspoon.com/r/6/765421/restaurant/Pizza-My-Heart-Santa-Cruz" target="_blank">Urbanspoon</a> and many more. If you're interested in <a
href="http://radar.oreilly.com/2009/05/google-adds-microformat-parsin.html" target="_blank">digging deeper</a> into the future of <a
href="http://knol.google.com/k/google-rich-snippets-tips-and-tricks#Tips_and_tricks" target="_blank">microformats</a> as they relate to web analytics as well, Dennis Mortensen from Yahoo! has <a
href="http://visualrevenue.com/blog/2009/12/using-microformats-to-extend-web-analytics-tagging.html" target="_blank">a great post</a> on what the future may hold.</p><p><a
href="http://yoast.com/google-microformats-conversion-rate-optimization-serps/">Google &amp; Microformats: Drive More Traffic</a> is a post from <a
href="http://yoast.com/about-me/">Joost de Valk</a>&#39;s <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></content:encoded> <wfw:commentRss>http://yoast.com/google-microformats-conversion-rate-optimization-serps/feed/</wfw:commentRss> <slash:comments>78</slash:comments> <media:thumbnail url="http://cdn.yoast.com/wp-content/uploads/2010/02/webmasters_146645_individualimage-125x95.png" /> <media:content url="http://cdn.yoast.com/wp-content/uploads/2010/02/webmasters_146645_individualimage.png" medium="image"> <media:title type="html">Individual Product</media:title> <media:thumbnail url="http://cdn.yoast.com/wp-content/uploads/2010/02/webmasters_146645_individualimage-125x95.png" /> </media:content> <media:content url="http://cdn.yoast.com/wp-content/uploads/2010/02/webmasters_146676_rspeople.png" medium="image"> <media:title type="html">People</media:title> <media:thumbnail url="http://cdn.yoast.com/wp-content/uploads/2010/02/webmasters_146676_rspeople-125x95.png" /> </media:content> </item> <item><title>Playing with the X-Robots-Tag HTTP header</title><link>http://yoast.com/x-robots-tag-play/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=x-robots-tag-play</link> <comments>http://yoast.com/x-robots-tag-play/#comments</comments> <pubDate>Sun, 20 Jan 2008 20:41:57 +0000</pubDate> <dc:creator>Joost de Valk</dc:creator> <category><![CDATA[SEO]]></category> <category><![CDATA[Microformats]]></category> <category><![CDATA[SEO tools]]></category> <category><![CDATA[Serverside]]></category><guid
isPermaLink="false">http://www.joostdevalk.nl/x-robots-tag-play/</guid> <description><![CDATA[<p>Ever since the announcement on the Google Blog and more recently Yahoo's announcement that they've enhanced their support for it, I've been meaning to play with the X-Robots-Tag header. This HTTP header allows you to do what you'd normally do in a robots meta tag, in an HTTP header, which has some pretty cool appliances. [...]</p><p><a
href="http://yoast.com/x-robots-tag-play/">Playing with the X-Robots-Tag HTTP header</a> is a post from <a
href="http://yoast.com/about-me/">Joost de Valk</a>&#39;s <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></description> <content:encoded><![CDATA[<p>Ever since the <a
href="http://googleblog.blogspot.com/2007/07/robots-exclusion-protocol-now-with-even.html">announcement on the Google Blog</a> and more recently Yahoo's announcement that they've <a
href="http://www.seroundtable.com/archives/015636.html">enhanced their support for it</a>, I've been meaning to play with the X-Robots-Tag header. This HTTP header allows you to do what you'd normally do in a <a
href="http://yoast.com/wordpress/meta-robots-wordpress-plugin/robots-meta-tags/">robots meta tag</a>, in an HTTP header, which has some pretty cool appliances. I'll show you a few cool things you can do with this, but first some theory. If you don't feel like that, skip to the <a
href="http://yoast.com/x-robots-tag-play/#examples">example uses of the X-Robots-Tag</a>.</p><p>As Sebastian explained in <a
href="http://www.seomoz.org/blog/robots-exclusion-protocol-101" title="Robots Exclusion Protocol 101">an excellent post on SEOmoz</a>, there are two different kinds of directives: crawler directives and indexer directives.</p><p><span
id="more-520"></span><br
/> <strong>Crawler directives</strong><br
/> The <code>robots.txt</code> file only contains the so called Crawler directives, telling search engines, identified by their <code>User-agent:</code>, where they are not allowed to go by using <code>Disallow:</code> and where they <em>can</em> (and should) go by using <code>Allow:</code>, and by pointing them at a <code>Sitemap:</code>.</p><p>As Sebastian pointed out and explains thoroughly in <a
href="http://sebastians-pamphlets.com/standardization-of-rep-tags-as-robots-txt-directives/">another brilliant post</a>, pages that search engines aren't allowed to spider, can still show up in the search results, when they have enough links pointing at them. This basically means that if you want to <em>really</em> <a
href="http://www.seomoz.org/blog/12-ways-to-keep-your-content-hidden-from-the-search-engines">hide something from the search engines</a> and thus from people using search, <code>robots.txt</code> just isn't good enough.</p><p><strong>Indexer directives</strong><br
/> Indexer directives are directives that are, even with the birth of the X-Robots-Tag, set on a per page or even per element basis. Up until July 2007, there were two: the microformat <a
href="http://microformats.org/wiki/rel-nofollow">rel="nofollow"</a>, which means that that link should not pass authority / PageRank, and the <a
href="http://yoast.com/wordpress/meta-robots-wordpress-plugin/robots-meta-tags/">Meta Robots tag</a>.</p><p>With the Meta Robots tag, you can <em>really</em> prevent search engines from showing the pages you block in the search results. You can reach the same with the relatively new X-Robots-Tag HTTP header. If you don't know what an HTTP header is, I'd suggest reading the <a
href="http://en.wikipedia.org/wiki/HTTP">Wikipedia page on it</a>, but in short: look at it as the envelope around your content. This HTTP header is better than the meta robots tag for a couple of reasons, one of them is that you can send those headers for other documents too. So, let's get into some examples.</p><h2><a
title="examples" name="examples"></a>Example uses of the X-Robots-Tag</h2><p>If you want to prevent search engines from showing files you've generated with PHP, add the following in the header file:</p><pre>header("X-Robots-Tag: noindex", true);</pre><p>This would not prevent search engines from following the links on those pages, if you want to do that, do the following:</p><pre>header("X-Robots-Tag: noindex, nofollow", true);</pre><p>But doing it in PHP is probably not the easiest use for this kind of thing. I myself greatly prefer setting headers in Apache, when possible. Consider, for instance, preventing search engines from caching / showing a preview for all .doc files on your domain, you would only have to do the following:</p><pre>&lt;FilesMatch "\.doc$"&gt;
Header set X-Robots-Tag "index, noarchive, nosnippet"
&lt;/Files&gt;</pre><p>Or, if you'd want to do this for both .doc and .pdf files:</p><pre>&lt;FilesMatch "\.(doc|pdf)$"&gt;
Header set X-Robots-Tag "index, noarchive, nosnippet"
&lt;/Files&gt;</pre><p>Or another case, your <code>robots.txt</code> file itself is <a
href="http://www.google.com/search?hl=en&amp;q=allinurl%3A%22%2Frobots.txt%22" rel="nofollow">showing up in the search results</a>. Adding this to your Apache config or your <code>.htaccess</code> file would solve that:</p><pre>&lt;FilesMatch "robots\.txt"&gt;
Header set X-Robots-Tag "noindex"
&lt;/FilesMatch&gt;</pre><p>I had a slight uncomfortable feeling when writing this down, so I e-mailed <a
href="http://www.mattcutts.com/blog/">Matt Cutts</a> asking the following: "&lt;snip&gt; would that mean that you will still fetch it for robots.txt purposes, but won't show it in the index?". I'm waiting for him to answer, and will add his response here once I have it.</p><p><strong>Tools</strong><br
/> I've quickly created a <a
href="javascript:(function(){function%20read(url){var%20r=new%20XMLHttpRequest();r.open('HEAD',url,false);r.send(null);return%20r.getAllResponseHeaders();}alert(read(window.location))})();">bookmarklet</a> which shows all the headers for a page (works in Moz browsers only I think, and a <a
href="http://cdn.yoast.com/wp-content/uploads/2008/01/headerdetector.user.js" target="_blank" title="X-Robots-Tag HeaderDetector">Greasemonkey script</a> which pops up when a page is using an X-Robots-Tag header.</p><p><strong>Conclusion</strong><br
/> As you can see, if you combine the examples above with the stuff you can learn from for instance <a
href="http://www.askapache.com/htaccess/using-filesmatch-and-files-in-htaccess.html">AskApache's .htaccess tutorial</a>, the X-Robots-Tag HTTP header becomes a very powerful tool. Use it wisely and with caution, as you won't be the first to block your entire site by accident, but it's a great addition to your toolset if you know how to use it.</p><p><a
href="http://yoast.com/x-robots-tag-play/">Playing with the X-Robots-Tag HTTP header</a> is a post from <a
href="http://yoast.com/about-me/">Joost de Valk</a>&#39;s <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></content:encoded> <wfw:commentRss>http://yoast.com/x-robots-tag-play/feed/</wfw:commentRss> <slash:comments>31</slash:comments> </item> <item><title>As usual, Technorati walks ahead of the pack</title><link>http://yoast.com/as-usual-technorati-walks-ahead-of-the-pack/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=as-usual-technorati-walks-ahead-of-the-pack</link> <comments>http://yoast.com/as-usual-technorati-walks-ahead-of-the-pack/#comments</comments> <pubDate>Tue, 23 Jan 2007 22:50:30 +0000</pubDate> <dc:creator>Joost de Valk</dc:creator> <category><![CDATA[Webdesign & development]]></category> <category><![CDATA[Blogging]]></category> <category><![CDATA[Microformats]]></category><guid
isPermaLink="false">http://www.joostdevalk.nl/blog/as-usual-technorati-walks-ahead-of-the-pack/</guid> <description><![CDATA[<p>They "invented" blogsearch, and did a LOT for the webdevelopment and blogging community. Now Technorati, it turns out, is working on the microformats search I asked for only two articles ago (it was there before that, I just didn't know about it)... Check it out in Technorati's Kitchen.</p><p><a
href="http://yoast.com/as-usual-technorati-walks-ahead-of-the-pack/">As usual, Technorati walks ahead of the pack</a> is a post from <a
href="http://yoast.com/about-me/">Joost de Valk</a>&#39;s <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></description> <content:encoded><![CDATA[<p>They "invented" blogsearch, and did a LOT for the webdevelopment and blogging community. Now Technorati, it turns out, is working on the microformats search <a
href="http://yoast.com/blog/googling-for-microformats/">I asked for</a> only two articles ago (it was there before that, I just didn't know about it)... Check it out in <a
href="http://kitchen.technorati.com/contact/search/">Technorati's Kitchen</a>.</p><p><a
href="http://yoast.com/as-usual-technorati-walks-ahead-of-the-pack/">As usual, Technorati walks ahead of the pack</a> is a post from <a
href="http://yoast.com/about-me/">Joost de Valk</a>&#39;s <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></content:encoded> <wfw:commentRss>http://yoast.com/as-usual-technorati-walks-ahead-of-the-pack/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Googling for microformats</title><link>http://yoast.com/googling-for-microformats/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=googling-for-microformats</link> <comments>http://yoast.com/googling-for-microformats/#comments</comments> <pubDate>Mon, 22 Jan 2007 13:31:46 +0000</pubDate> <dc:creator>Joost de Valk</dc:creator> <category><![CDATA[SEO]]></category> <category><![CDATA[Webdesign & development]]></category> <category><![CDATA[Microformats]]></category> <category><![CDATA[Web Design]]></category><guid
isPermaLink="false">http://www.joostdevalk.nl/blog/googling-for-microformats/</guid> <description><![CDATA[<p>Imagine, you can type in a query like "joost de valk class:vcard" and Google comes up with my contact page, because that has a vcard class in it's markup, the main class of the hCard microformat. This was suggested today on the uf-discuss mailing list, a mailing list I've been lurking on for quite a [...]</p><p><a
href="http://yoast.com/googling-for-microformats/">Googling for microformats</a> is a post from <a
href="http://yoast.com/about-me/">Joost de Valk</a>&#39;s <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></description> <content:encoded><![CDATA[<p>Imagine, you can type in a query like "joost de valk class:vcard" and Google comes up with <a
href="http://yoast.com/contact/">my contact page</a>, because that has a vcard class in it's markup, the main class of the <a
href="http://microformats.org/wiki/hcard">hCard microformat</a>. This was suggested today on the uf-discuss mailing list, a mailing list I've been lurking on for quite a while now, and it made me go "YES! That's what I want!".</p><p><span
id="more-134"></span></p><p>It would be so cool if Google, or any other SE for that matter, knew how to handle searches like that. The same could be done for events, resume's etc. Google would probably want to make it simpler, or make another page for it, since I can't see my mum typing in "class:vcard", but the idea is good, and I think something people should be working on.</p><p>Update 18-2-2010: It took them a while, but it's hear now: <a
href="http://yoast.com/google-microformats-conversion-rate-optimization-serps/">Google &amp; Microformats</a>.</p><p><a
href="http://yoast.com/googling-for-microformats/">Googling for microformats</a> is a post from <a
href="http://yoast.com/about-me/">Joost de Valk</a>&#39;s <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></content:encoded> <wfw:commentRss>http://yoast.com/googling-for-microformats/feed/</wfw:commentRss> <slash:comments>14</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using apc (request URI is rejected)
Database Caching 6/28 queries in 0.030 seconds using apc
Content Delivery Network via cdn.yoast.com

Served from: yoast.com @ 2010-09-08 09:14:02 -->