WordPress: How to Fix Missing required field entry-title, Update, hCard Error in Google Structured Data tool.
Recently when I tested one of my WordPress weblogs via Google Structured Data testing tools, I got the following errors:
Error: Missing required field “entry-title”.
Error: Missing required field “updated”.
Error: Missing required hCard “author”.
It was strange, as everything was already described in my WordPress theme codes, but still, I was getting the error and I had to resolve the problem.
What I noticed that it was described in the theme but not as Google wanted them to be. So, Here in this article, I’ll try to help out each and everyone in a simple way about how I resolved this issue.
Fixing “Error: Missing required field entry-title.”
In your WordPress theme’s single.php
file. Here look for the the_title()
function called. Let say this function is used in the following HTML format.
<h1 class="title single-title"><?php the_title(); ?></h1>
In this above code snippet, the entry-title
class is missing, which is required according to the Google Structured Data testing tools. So, need to add an entry-title class to fix “Error: Missing required field entry-title
” as below mentioned.
<h1 class="title single-title entry-title"><?php the_title(); ?></h1>
Fixing “Error: Missing required field updated.”
To fix this issue in single.php
file look for
function. Let say the_time()
function is called in following html format.the_time()
<span class="post_date"><?php the_time('j F,Y'); ?></span>
In this above code snippet date, the updated class is missing which is required according to Google Structured tools. So, need to add this class to fix this issue.
<span class="post_date date updated"><?php the_time('j F,Y'); ?></span>
Fixing “Error: Missing required hCard author.”
In single.php
file look for the_author()
function. It may be called in the following HTML format.
<span class="theauthor"><?php the_author(); ?></span>
Here to fix this issue, we need to add the vcard author class as below described.
<span class="vcard author">
<span class="fn"><?php the_author(); ?></span>
</span>
Now all is done. After this modification, these errors will be resolved.
Please login or create new account to add your comment.