hatom-entry errors on the Google snippet test

Almost sure that I’m not the first one that has this question but when I test my (WordPress) page on Google Snippet Test Tool I got hatom-enty errors like:

hatom-feed

hatom-entry:
    
Fout: At least one field must be set for HatomEntry.

Fout: Missing required field "entry-title".

Fout: Missing required field "updated".

Fout: Missing required hCard "author".

I found some tutorials about this but that is for standard WordPress themes. I’m using Inovado from ThemeForest and I can’t figure out in which file I have to edit this data.

Read More

Someone familiar with this?

I also got problems with snippet review… Good in testresults but doesn’t show up in de Google Search Results. Don’t know why…

Related posts

Leave a Reply

1 comment

  1. You can Add this code to the function.php file in your theme’s directory and it will solve the problems.

    //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()) {
        $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');
    

    The code contains 2 functions. The first function will use the WordPress filter hook for “the_content” to add the class of “entry-content” to the article. To add in the other essential hAtom fields, the second function will add a short sentence to the end of your post article, which contains updated time, post title and author, with required microdata.