• Hi Guys,

    The thing is I’m using divi child theme and implemented structured data on website pages & posts. Now, when I test these pages and posts in Google Structured Data Testing Tool, all showing green, no error no warning. Now when i check my website in Google webmaster tool under structured data section, it is showing error of Data type: hentry with Missing: author and Missing: updated error. I searched a lot everywhere nut never got any solution.

    It will be great, if you guys can tell me about it.

    Thanks,
    Rahul

Viewing 1 replies (of 1 total)
  • By adding this, I manage to remove the “Update” one, but still lacking Author.

    function et_last_modified_date_blog( $the_date ) {
    if ( ‘post’ === get_post_type() ) {
    $the_time = get_post_time( ‘His’ );
    $the_modified = get_post_modified_time( ‘His’ );
    
    $last_modified = sprintf( __( ‘Last updated %s’, ‘Divi’ ), esc_html( get_post_modified_time( ‘M j, Y’ ) ) );
    $date = $the_modified !== $the_time ? $last_modified : get_post_time( ‘M j, Y’ );
    
    return $date;
    }
    }
    add_action( ‘get_the_date’, ‘et_last_modified_date_blog’ );
    add_action( ‘get_the_time’, ‘et_last_modified_date_blog’ );

    [Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]

    • This reply was modified 7 years, 7 months ago by bdbrown.
    • This reply was modified 7 years, 7 months ago by bdbrown.
Viewing 1 replies (of 1 total)
  • The topic ‘GWT is showing Missing: author & updated error in Divi Child Theme’ is closed to new replies.