Title: Google Webmaster Tools Structured Data Microformat/Microdata (hentry) errors
Last modified: August 22, 2016

---

# Google Webmaster Tools Structured Data Microformat/Microdata (hentry) errors

 *  Resolved [MScrumptious](https://wordpress.org/support/users/mscrumptious/)
 * (@mscrumptious)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/google-webmaster-tools-structured-data-microformatmicrodata-hentry-errors/)
 * Google Webmaster tools reports hundreds of Structured Data errors when using 
   this theme. The Data Type that Googlebot seems to have an issue with is “hentry”.
   It associates the Data Type and corresponding error with taxonomy pages (like
   tags, categories, etc.) Here is one example of one such error:
 * > hentry
   >  Page URL: /category/photography/ itemtype: [http://microformats.org/profile/hentry](http://microformats.org/profile/hentry)
   > bookmark: [http://www&#8230](http://www&#8230);.mysite…com/mirrorless-cameras/
   > Missing: author
   >  Missing: entry-title Missing: updated
 * From what I gathered, this HENTRY should only be output on posts instead of all
   pages in the theme since pages don’t have ‘author, entry-title, updated’ etc.
 * I’m fairly new to wordpress but not new to code in general. What can be done 
   so that ‘hentry’ only outputs on posts?
 * Thanks for your help in advance!

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Theme Author [acosmin](https://wordpress.org/support/users/acosmin/)
 * (@acosmin)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/google-webmaster-tools-structured-data-microformatmicrodata-hentry-errors/#post-5536948)
 * Hi! I don’t really know where you got that, are you using any WordPress SEO plugins?
 * The only “hentry” thing that this theme has is a css class for posts, outputted
   by WordPress via [post_class()](http://codex.wordpress.org/Function_Reference/post_class)(
   and I can’t change it, it’s included in all the themes that follow basic WP coding
   guidelines).
 * Later Edit: You could implement something like this: [https://wordpress.org/ideas/topic/exclude-a-class-from-post_class](https://wordpress.org/ideas/topic/exclude-a-class-from-post_class)
   if it’s really necessary.
 *  Theme Author [acosmin](https://wordpress.org/support/users/acosmin/)
 * (@acosmin)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/google-webmaster-tools-structured-data-microformatmicrodata-hentry-errors/#post-5536950)
 * You made me curious.. Try adding this in `functions.php`
 *     ```
       /*  Remove Hentry
       /* ------------------------------------ */
       function remove_hentry( $classes ) {
       	$classes = array_diff($classes, array('hentry'));	
   
       	return $classes;
       }
       add_filter( 'post_class', 'remove_hentry' );
       ```
   
 *  Thread Starter [MScrumptious](https://wordpress.org/support/users/mscrumptious/)
 * (@mscrumptious)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/google-webmaster-tools-structured-data-microformatmicrodata-hentry-errors/#post-5536957)
 * No SEO plugins. I’m only using Acosmin Ads Widgets, BackUpWordPress, Caldera 
   Forms, and Light Responsive LightBox.
 * I’ve included screenshots here in the order of how I see it in Google Webmaster
   Tools:
 * 01: [http://i.imgur.com/qxy4Wmi.jpg](http://i.imgur.com/qxy4Wmi.jpg)
    02: [http://i.imgur.com/cbhOvTF.jpg](http://i.imgur.com/cbhOvTF.jpg)
   03: [http://i.imgur.com/Eosb59l.jpg](http://i.imgur.com/Eosb59l.jpg)
 * I would prefer not to completely filter out the tag. It seems like useful markup
   for posts. The problem seems to be that it also outputs empty microdata markup
   on ‘pages’ such as taxonomy pages and others which have none of the aforementioned
   data associated.
 * I’ll provide the domain through your contact form on your web site if that helps.
 *  Theme Author [acosmin](https://wordpress.org/support/users/acosmin/)
 * (@acosmin)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/google-webmaster-tools-structured-data-microformatmicrodata-hentry-errors/#post-5536967)
 * Do these errors appear with other WP themes? I coded this theme with the guidelines
   in mind, [Twenty Fourteen](https://wordpress.org/themes/twentyfourteen) has almost
   the same structure and it’s the default theme.
 * I don’t know what to say, what would you like to remove?
 *  Thread Starter [MScrumptious](https://wordpress.org/support/users/mscrumptious/)
 * (@mscrumptious)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/google-webmaster-tools-structured-data-microformatmicrodata-hentry-errors/#post-5536974)
 * I will experiment and report back. For now, how can I filter/remove Hentry tag
   via functions.php for everything EXCEPT Posts?
 *  Theme Author [acosmin](https://wordpress.org/support/users/acosmin/)
 * (@acosmin)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/google-webmaster-tools-structured-data-microformatmicrodata-hentry-errors/#post-5536995)
 * Maybe something like:
 *     ```
       /*  Remove Hentry
       /* ------------------------------------ */
       function remove_hentry( $classes ) {
       	if( !is_single() ) {
       		$classes = array_diff($classes, array('hentry'));
       		return $classes;
       	} else {
       		return $classes;
       	}
       }
       add_filter( 'post_class', 'remove_hentry' );
       ```
   
 *  Thread Starter [MScrumptious](https://wordpress.org/support/users/mscrumptious/)
 * (@mscrumptious)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/google-webmaster-tools-structured-data-microformatmicrodata-hentry-errors/#post-5537004)
 * Thank you, that’s what I was looking for. That code ‘works’. It works in that
   it makes the problem go away in Google Webmaster Tools. Interestingly, it works
   when I put it at the end of the function.php file after other things have been
   executed and not when I add it towards the top of the functions.php file.
 * I also found this code in another thread dealing with this problem:
 *     ```
       //add hatom data
       function add_suf_hatom_data($content) {
           $t = get_the_modified_time('F jS, Y');
           $author = get_the_author();
           $title = get_the_title();
       if (is_home() || is_singular() || is_archive() ) {
               $content .= '<div class="hatom-extra" style="display:none;visibility:hidden;"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>';
           }
           return $content;
           }
       add_filter('the_content', 'add_suf_hatom_data');
       ```
   
 * Here’s the thread where I found it:
 * [https://wordpress.org/support/topic/how-to-fix-warning-missing-required-field-entry-title-in-rich-snippet-tool](https://wordpress.org/support/topic/how-to-fix-warning-missing-required-field-entry-title-in-rich-snippet-tool)
 * Again, thanks for making this problem go away. Really appreciate the quick response.
 *  Theme Author [acosmin](https://wordpress.org/support/users/acosmin/)
 * (@acosmin)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/google-webmaster-tools-structured-data-microformatmicrodata-hentry-errors/#post-5537006)
 * No problem. I’m glad it worked.
 *  [tylerindo](https://wordpress.org/support/users/tylerindo/)
 * (@tylerindo)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/google-webmaster-tools-structured-data-microformatmicrodata-hentry-errors/#post-5537209)
 * where abouts would I insert this code? I put it after everything in the functions.
   php and nothing has happened. does webmaster tools take a few days to recognize
   the change?
 *  [encoder](https://wordpress.org/support/users/encoder/)
 * (@encoder)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/google-webmaster-tools-structured-data-microformatmicrodata-hentry-errors/#post-5537213)
 * If you want to see the instant results you should try the [Structured Data Testing Tool](https://developers.google.com/structured-data/testing-tool/)
   provided by Google.
    Yes, the webmaster tools takes some time (days) to process
   the changes.
 *  [vanukuru.br](https://wordpress.org/support/users/vanukurubr/)
 * (@vanukurubr)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/google-webmaster-tools-structured-data-microformatmicrodata-hentry-errors/#post-5537215)
 * I wonder why everyone recommends removing the hentry code. I was using Avada 
   theme, but found a valid solution and a fix to provide the hentry data like author
   name, posted date, laste updated date etc.. and remove the errors in Google Search
   Console (webmater tool).
 * The [solution for Hentry issue](http://www.mytechlogy.com/IT-challenges/9637/tech-challenges-how-to-remove-hentry-errors-appearing-in-google-webmaster-tools-for-my-wordpress-website/)
   is by adding the rich data snippets to each and every page that gives a listing
   of the posts (like search listing, author page, posts by month, blogs by category
   etc..) and on the post detail page.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Google Webmaster Tools Structured Data Microformat/Microdata (hentry)
errors’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/justwrite/2.0.3.6/screenshot.png)
 * JustWrite
 * [Support Threads](https://wordpress.org/support/theme/justwrite/)
 * [Active Topics](https://wordpress.org/support/theme/justwrite/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/justwrite/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/justwrite/reviews/)

## Tags

 * [hentry](https://wordpress.org/support/topic-tag/hentry/)
 * [microdata](https://wordpress.org/support/topic-tag/microdata/)
 * [microformat](https://wordpress.org/support/topic-tag/microformat/)

 * 11 replies
 * 5 participants
 * Last reply from: [vanukuru.br](https://wordpress.org/support/users/vanukurubr/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/google-webmaster-tools-structured-data-microformatmicrodata-hentry-errors/#post-5537215)
 * Status: resolved