• Will there be a plugin update to fix the missing hatom (markup: microformats.org) Missing: author, Missing: updated errors found with the Google Search Console?

    See link for details.

    Schema Version: 1.6.9.8.1
    Wordpress: Version 4.9.6

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Hesham Zebida

    (@hishaman)

    The plugin doesn’t cause these errors, also it doesn’t fix errors caused in the Theme or by other plugins.

    Most of the missing hatom errors comes from Themes, so I suggest that you try fixing it manually within the Theme you are using.

    Thread Starter Jeff Borghoff

    (@jborghoff)

    Thanks @hishaman I’m not a good PHP coder and I’m using the out of the box Twenty Ten theme so it’s looks like i’m in a bad spot here.

    • This reply was modified 6 years, 5 months ago by Jeff Borghoff.
    Plugin Author Hesham Zebida

    (@hishaman)

    No worries.

    Try this plugin, I haven’t tried it myself, but it seems to be working based on user reviews.

    If you are getting this on pages, you can add this to your function.php file:

    //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() || is_archive()) {
    		$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');
    
    function wpb_last_updated_date( $content ) {
    $u_time = get_the_time('U'); 
    $u_modified_time = get_the_modified_time('U'); 
    if ($u_modified_time >= $u_time + 86400) { 
    $updated_date = get_the_modified_time('F jS, Y');
    $updated_time = get_the_modified_time('h:i a'); 
    $custom_content .= '<p class="last-updated">Last updated on '. $updated_date . ' at '. $updated_time .'</p>';  
    } 
    
        $custom_content .= $content;
        return $custom_content;
    }
    add_filter( 'the_content', 'wpb_last_updated_date' );

    It did the trick for me, make sure to have a FTP access to change the file back remotely if any issue arises, but that code should do the trick

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘ERRORS: Structured Data > hatom (markup: microformats.org)’ is closed to new replies.