[Request for change] hAtom microformat fix
-
Symptoms
Google Webmaster Tools > Structured Data
hentry ERROR
Missing: entry-title
Missing: updatedCause
The use of CSS class “hentry” in the Pilotfish template requires additional CSS class tags to reflect the author, title, date updated, etc.Solution
Add the following code to the bottom of functions.php://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');
- The topic ‘[Request for change] hAtom microformat fix’ is closed to new replies.