{"id":572,"date":"2012-10-05T02:05:41","date_gmt":"2012-10-05T08:05:41","guid":{"rendered":"https:\/\/www.joshualyman.com\/?page_id=572"},"modified":"2012-10-05T02:13:27","modified_gmt":"2012-10-05T08:13:27","slug":"twenty-twelve-schema-org-child-theme","status":"publish","type":"page","link":"https:\/\/www.joshualyman.com\/twenty-twelve-schema-org-child-theme\/","title":{"rendered":"Twenty Twelve Schema.org Child Theme"},"content":{"rendered":"

\"\"<\/a>The great folks at WordPress have come out with a new default theme along with WordPress 3.4, and it is a very good one. Twenty Twelve is responsive, clean, and easy to work with. So of course I naturally had to add my Schema.org data back into it once I activated it!<\/p>\n

Very similar to what I had done with Twenty Eleven, I created a child theme that extends the default Twenty Twelve by adding microdata into the markup. I also added in a three widget section to the footer, a feature of T11 that I missed in T12. Hopefully this can be of use to others as well. What follows is the same description from the T11 Schema.org child theme that I had previously written.<\/p>\n

By adding Schema.org microdata to the Twenty Twelve theme, we gain several benefits. Google, along with several other large companies like Bing and Yahoo, introduced Schema.org<\/a>, 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.<\/p>\n

Example?<\/h2>\n

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<\/a> pulls them out.<\/p>\n

\n

Without Schema.org embedded<\/h3>\n
<article>\r\n  <header>\r\n    <h1>A blog post<\/h1>\r\n    <div>\r\n      Posted on <time datetime=\"2012-01-19T12:59:46+00:00\" pubdate>January 19, 2012<\/time>\r\n    <\/div><!-- .entry-meta -->\r\n  <\/header><!-- .entry-header -->\r\n\r\n  <div> ... Entry goes here ... <\/div><!-- .entry-content -->\r\n\r\n  <footer>\r\n    Category: <span><a href=\"#\" rel=\"category\">Programming<\/a><\/span>\r\n    Tagged: <span><a href=\"#\" rel=\"tag\">javascript<\/a><\/span>\r\n    By: <a href=\"#\" rel=\"author\">Joshua<\/a>.\r\n  <\/footer><!-- .entry-meta -->\r\n<\/article><\/pre>\n<\/div>\n
\n

With Schema.org embedded<\/h3>\n
<article itemscope itemtype=\"http:\/\/schema.org\/BlogPosting\">\r\n  <header>\r\n    <h1 itemprop=\"headline\">A blog post<\/h1>\r\n    <div>\r\n      Posted on <time datetime=\"2012-01-19T12:59:46+00:00\" pubdate itemprop=\"datePublished\">January 19, 2012<\/time>\r\n    <\/div><!-- .entry-meta -->\r\n  <\/header><!-- .entry-header -->\r\n\r\n  <div itemprop=\"articleBody\"> ... Entry goes here ... <\/div><!-- .entry-content -->\r\n\r\n  <footer>\r\n    Category: <span itemprop=\"articleSection\"><a href=\"#\" rel=\"category\">Programming<\/a><\/span>\r\n    Tagged: <span itemprop=\"keywords\"><a href=\"#\" rel=\"tag\">javascript<\/a><\/span>\r\n    By: <span itemprop=\"author\" itemscope itemtype=\"http:\/\/schema.org\/Person\">\r\n      <span itemprop=\"name\">\r\n        <a href=\"#\" rel=\"author\" itemprop=\"url\">Joshua<\/a>\r\n      <\/span>\r\n    <\/span>.\r\n  <\/footer><!-- .entry-meta -->\r\n<\/article><\/pre>\n<\/div>\n
\n

Google’s Rich Snippets Extract<\/h3>\n
Item\r\n    Type: http:\/\/schema.org\/blogposting\r\n    headline = A blog post\r\n    datepublished = 2012-01-19T12:59:46+00:00\r\n    articlebody = ... Post content here ...\r\n    articlesection = Programming\r\n    keywords = javascript\r\n    author = Item (1)\r\n\r\nItem 1\r\n    Type: http:\/\/schema.org\/person\r\n    name = Joshua\r\n    url\r\n        text = Joshua\r\n        href = #<\/pre>\n<\/div>\n

Download<\/h2>\n

Download the Twenty Twelve Schema.org Child Theme:\u00a0Twenty Twelve Schema.org Child Theme – v1.0<\/a><\/p>\n

Fork this project on GitHub<\/a><\/em><\/p>\n

I would appreciate any feedback you have or any bugs you notice, and you can get in touch with me here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"

The great folks at WordPress have come out with a new default theme along with WordPress 3.4, and it is a very good one. Twenty Twelve is responsive, clean, and easy to work with. So of course I naturally had…<\/p>\n