A day ago, Ian Anderson Gray from iag.me opened this new thread in the Github repository for Yoast’s WordPress SEO plugin. He surely isn’t the only one thinking about using Schema.org markup in WordPress (I do too!), so if you are also interested, you should join the discussion. In this article I will not tell you the great unique amazing solution for this. BUT – I will show you how to modify the WordPress SEO plugin (using filters only) so that the plugin’s breadcrumbs will be using valid Schema.org markup instead of the old RDFa markup.
I personally think that Schema.org should be handled by WordPress themes because it will pretty much integrate with everything on the website (it should so that Google gets as much information as possible!). So while a plugin for this might help, I’d prefer to see themes that fully feature Schema.org markup. For this reason, I just developed a way to modify the breadcrumbs from Yoast’s WordPress SEO plugin. Adding the class below will do all the changes. I just wrote this, and I don’t have too much time right now, so I won’t describe everything in there. But if you are a coder, that should not be too hard to understand. So here is my class which will replace the RDFa markup with valid Schema.org markup that is correctly parsed by Google.
All you need to do is include this class in your theme and then instantiate it. The readme file in the Github repository tells you how to do so.
And that’s it!
If you have any questions about the usage of this class or if you find any mistakes or bugs, please comment or email me, thank you in advance!