Error: Missing required field "updated".
-
My site is https://www.newztewz.com/
By googles structured data test,Error: Missing required field “updated”. occurs. I searched the whole internet but couldn’t resolve it..
I am using Preus theme
here is the code in template-tags.php.tell me whats wrong in it??if ( ! function_exists( ‘preus_posted_on’ ) ) :
/**
* Prints HTML with meta information for the current post-date/time and author.
*/
function preus_posted_on() {
$time_string = ‘<time class=”entry-date published” datetime=”%1$s”>%2$s</time>’;
if ( get_the_time( ‘U’ ) !== get_the_modified_time( ‘U’ ) )
$time_string .= ‘<time class=”updated” datetime=”%3$s”>%4$s</time>’;$time_string = sprintf( $time_string,
esc_attr( get_the_date( ‘c’ ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( ‘c’ ) ),
esc_html( get_the_modified_date() )
);printf( __( ‘<span class=”posted-on “><i class=”fa fa-clock-o”> </i> %1$s</span> <span class=”byline”> <i class=”fa fa-user”> </i> %2$s</span>’, ‘preus’ ),
sprintf( ‘%2$s‘,
esc_url( get_permalink() ),
$time_string
),
- The topic ‘Error: Missing required field "updated".’ is closed to new replies.