X causes errors in Google, so sites are NOT in search results!

Hi,

X is causing errors when Google crawls a website which means some pages might not be displayed in search results. This is obviously very serious. (I have googled the problem and all the answers say it is down to a theme problem.)

It’s something to do with hentry, so Google returns these errors:
Missing: author
Missing: entry-title
Missing: updated

I’ve seen temporary fixes, but the root cause is a problem with the theme.

Please update X as quickly as possible.

Thanks,
Steve

Hi Steve,

Thanks for writing in!

To fix it, you can try adding the code below in your child theme’s functions.php file.

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');

Hope that helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.