The default WordPress Twenty Eleven theme is beautiful and functional. I wanted to make it even more functional by including added microdata in the theme by default. Google, along with several other large companies like Bing and Yahoo, introduced Schema.org, a collection of microdata formats that can be used as a common machine language to identify bits and pieces of web pages. This theme incorporates that language and embeds it directly into your site.
Example?
Sure. Here is a side-by-side of the author section of a blog post (slightly abbreviated from the real source). Note the elements that were added, and then how Google’s rich snippets tool pulls them out.
Without Schema.org embedded
<article> <header> <h1>A blog post</h1> <div> Posted on <time datetime="2012-01-19T12:59:46+00:00" pubdate>January 19, 2012</time> </div><!-- .entry-meta --> </header><!-- .entry-header --> <div> ... Entry goes here ... </div><!-- .entry-content --> <footer> Category: <span><a href="#" rel="category">Programming</a></span> Tagged: <span><a href="#" rel="tag">javascript</a></span> By: <a href="#" rel="author">Joshua</a>. </footer><!-- .entry-meta --> </article>
With Schema.org embedded
<article itemscope itemtype="http://schema.org/BlogPosting"> <header> <h1 itemprop="headline">A blog post</h1> <div> Posted on <time datetime="2012-01-19T12:59:46+00:00" pubdate itemprop="datePublished">January 19, 2012</time> </div><!-- .entry-meta --> </header><!-- .entry-header --> <div itemprop="articleBody"> ... Entry goes here ... </div><!-- .entry-content --> <footer> Category: <span itemprop="articleSection"><a href="#" rel="category">Programming</a></span> Tagged: <span itemprop="keywords"><a href="#" rel="tag">javascript</a></span> By: <span itemprop="author" itemscope itemtype="http://schema.org/Person"> <span itemprop="name"> <a href="#" rel="author" itemprop="url">Joshua</a> </span> </span>. </footer><!-- .entry-meta --> </article>
Google’s Rich Snippets Extract
Item
Type: http://schema.org/blogposting
headline = A blog post
datepublished = 2012-01-19T12:59:46+00:00
articlebody = ... Post content here ...
articlesection = Programming
keywords = javascript
author = Item (1)
Item 1
Type: http://schema.org/person
name = Joshua
url
text = Joshua
href = #
Download
Download the beta: TwentyEleven Schema.org Child Theme – v1.3b
I would appreciate any feedback you have or any bugs you notice, and you can get in touch with me here.
Nice work , let me view it !!
You’re viewing it! I use it as the default theme on my site. It is not any visually different, but adds the Schema.org data in. You can download a copy at http://www.joshualyman.com/wp-content/uploads/2012/01/twentyeleven-schema-child.zip or at the link above.