Fix ‘hentry’ Errors in your Theme Templates

The WPSSO Core plugin should provide error free Schema markup when validating your webpages with Google’s Structured Data Testing Tool — but old hatom / microformats.org markup in your theme’s templates may generate some errors.

One such error might be from your theme’s use of the ‘hentry’ CSS class, which is meant to define an article code block, that must contain additional markup for the author, published date, etc. Unfortunately, in some cases, this additional markup is missing from the templates, thus creating an error for ‘hentry’ in Google’s Structured Data Testing Tool. In all cases, you should report the error to the theme’s author so they can fix their templates (more information on how to complete the ‘hentry’ markup).

Meanwhile, here’s a quick fix to remove the ‘hentry’ CSS class from your theme’s templates (provided your theme uses standard WordPress filters) — simply add the following code to your theme’s functions.php file. Since the WPSSO Core plugin includes all necessary information in the Schema Article markup, the ‘hentry’ information is redundant and can be safely removed. ;-)