Fix Google Authorship’s ‘Warning: Missing required field “updated”‘ with WordPress Twenty Fourteen theme

1.Open Twenty Fourteen’s inc/template-tags.php
2.find function twentyfourteen_posted_on():

	// Set up and print post meta information.
	printf( ' ',
		esc_url( get_permalink() ),
		esc_attr( get_the_date( 'c' ) ),
		esc_html( get_the_date() ),
		esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
		get_the_author()
	);

3.add a “updated” class to the time:

	// Set up and print post meta information.
	printf( ' ',
		esc_url( get_permalink() ),
		esc_attr( get_the_date( 'c' ) ),
		esc_html( get_the_date() ),
		esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
		get_the_author()
	);

4.check again with Google Structured Data Testing Tool, should be no more ‘Warning: Missing required field “updated”s.

Thanks to Daniel Marquard’s post at http://www.technosultants.com/blog/warning-missing-required-field-updated-wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *