07/14/2014 at 3:01 pm
#296965
Keymaster
@ Craig
This is a theme SEO issue for establishing the authorship of a page using the hAtom microdata markup. The entry data for Connections is marked up in the hCard microdata format which is not what the rich snippet tool is validating.
I found the following on the on the WordPress Support Forums:
//mod content
function hatom_mod_post_content ($content) {
if ( in_the_loop() && !is_page() ) {
$content = '<span class="entry-content">'.$content.'</span>';
}
return $content;
}
add_filter( 'the_content', 'hatom_mod_post_content');
//add hatom data
function add_mod_hatom_data($content) {
$t = get_the_modified_time('F jS, Y');
$author = get_the_author();
$title = get_the_title();
if ( is_single() || is_page()) {
$content .= '<div class="hatom-extra"><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_mod_hatom_data');
Dropping that in the theme’s functions.php file should fix the error messages in the web master tools.
One of the SEO enhancements on my to do list will be to filter (set) the page date created/modified of a single entry to the entries created/modified dates instead of using the page’s.
Hope that helps!
