Support » Theme: Esplanade » hEntry tag support for improved SEO (Google Structured Microdata Error)

  • Via Google Webmaster Tools, I’ve been getting errors related to Structured Data > hentry (markup: microformats.org):

    • Missing: author
    • Missing: updated

    It’s due to the post_class feature under WP’s function that adds hEntry, so it’s not entirely a problem specific to the Esplanade theme, but all other themes that do not have the addition microformat tags in the archive/home/list page types.

    I’ve resolved this issue by following this support thread: https://wordpress.org/support/topic/google-webmaster-tools-structured-data-microformatmicrodata-hentry-errors

    Didn’t manage to make it work via add_filter in functions.php, but I did make it work by editing content.php and adding the following lines after <!-- .entry-summary -->:

    <?php
        $t = get_the_modified_time('F jS, Y');
        $author = get_the_author();
        $title = get_the_title();
        echo '<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>';
        ?>

    Putting this info out here, just in case the theme author would like to add this into the theme or if you can figure out a cleaner way of solving this.

    It solved mine.

  • The topic ‘hEntry tag support for improved SEO (Google Structured Microdata Error)’ is closed to new replies.