• 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 .= '<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_hatom_data');

    This link explains it all

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Add Hatom data markup from microformats.org’ is closed to new replies.