Site logo

Archived topic

data markup from microformats theme Error

1 reply · Started by Joanne Smith on May 5, 2016

Viewing posts 1–2 of 2

hi
re: SEO - Google is saying the THEME is not set up correctly for data markup from microformats (( its a wordpress issue too ))

hatom
SiteNavigationElement
CreativeWork
WPHeader
WPFooter
WPSideBar
Blog
WebPage
Review

and I saw a fix for another theme how could I apply this fix to your theme refer below ??

######

Google webmaster tools returns 3 errors at structured data section.

The theme lacks from entry-title, author and updated hatom-feed data.

I've managed to resolve this error with this code on my child theme functions.php

// Fixing rich snippets for hatom-feed at hatom-entry
//add hatom data
function add_hatom_data($content) {
$t = get_the_modified_time('F jS, Y');
$author = get_the_author();
$title = get_the_title();
if (is_singular()) {
$content .= '

<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>

';
}
return $content;
}
add_filter('the_content', 'add_hatom_data');

This link explains it all

This archived topic is closed to new replies.