We don’t normally publish much about our maintenance releases–usually because they’re to fix bugs or correct regressions introduced in a previous release–but we felt like Genesis 2.2.6 deserves an explanation, especially for those of you who are interested in and enjoy the way Genesis handles Schema.org integration through our markup API.
When we first introduced Schema.org integration in Genesis, we wanted to try to be a specific as we possibly could. For example, if we knew a search results page was being displayed, we would make sure to mark that page as a search results page using microdata.
In that same spirit, we wanted to make sure that blog posts got marked up as a “blogPosting” content type.
But there’s a problem with that. As I’m sure many of you would agree, blog posts aren’t always blog posts. WordPress is so much more than a blogging platform, and even though custom post types exist, many people still use the standard “post” to publish all kinds of different content. Podcasts, image galleries, recipes … the list goes on.
So saying that all posts are “blogPosting”s really isn’t accurate.
But a new problem was brought to our attention recently. Turns out that Google requires anything that you mark up as an “Article” (or sub-types of “Article”, including “blogPosting”) to include some extra elements: an Image and a Publisher, both of which require new objects be added to the entry content output. We even received reports from our users that Google is flagging their content as spam, because they’re detecting a “blogPosting” without associated Image and Publisher objects.
So, rather than force new output in your content, we decided to remedy the original problem while solving the new one.
Instead of considering all post entries as “blogPosting”, we are using the more generic (but still perfectly valid) “CreativeWork”. For what it’s worth, this is what all your published pages were marked up as all along.
“CreativeWork” has fewer required elements, and therefore passes Google’s structured data testing tool.
Getting your “blogPosting” back on
If you know that you’re using post entries as blog posts, you might be wondering how you can switch back to using the “blogPosting” schema markup. Totally understandable, and totally possible.
Just know that if you do this, you’re going to need to make sure your blog posts have featured images, and you’re going to have to provide publisher information. You’re also going to need to write a little code. But fear not! Here’s some code that will get you started, with inline comments that will help explain things. Just paste the code in your child theme’s functions.php file, and fill in the blanks.
The other stuff
While we have you here, here are the other things we fixed in this release.
First, WordPress 4.4 compatibility.
WordPress 4.4 was released recently, and they added a really cool, and finally official, way of storing meta data for terms. For those who don’t know, terms are things like your categories and tags.
For years now, Genesis has relied on a fairly clunky way of doing term meta storage, so we’re happy a much better official offering has been introduced. Genesis 2.2.6 switches everything over to the new official term meta system, converting all the old data over to the new system.
Second, we’re including and using our own html5shiv file.
Certain older browsers had trouble recognizing the new HTML5 elements that we use in Genesis. And if they don’t recognize them, they don’t render them properly. So we included a call to something called the html5shiv javascript file in Genesis, but only served it to people using older browsers. The file we referenced was hosted at Google Code, but that service is no longer offered, so they’re taking down all the code hosted there.
So, instead of linking to the file hosted at Google Code, we pulled the file (it’s open source) into Genesis and link to that copy instead. An easy, but necessary, fix.
So that’s it. 2.2.6 is available now, and you can update from your dashboard.