Fix Google hCard Warnings

How to Fix Google hCard Warnings

You might see some warning while checking your website on “Google Rich Snippet Tool”. Like

  • Warning: Missing required field “entry-title”.
  • Warning: Missing required field “updated”.
  • Warning: Missing required hCard “author”.
  • Warning: At least one field must be set for Hcard.
  • Warning: Missing required field “name (fn)”.
  • Warning: At least one field must be set for HatomEntry

In order to resolve these warnings we need to make necessary changes on single.php file itself. Within this article I will demonstrate how to fix these warning messages.

Why its important to fix these warning messages:

Although these warning messages that are showing on Googles Structure Data Tool named Rich snippet are not major errors that will effect on Google’s crawling but still I will suggest in view of site’s 100% health we should get these issues fixed. Because if there are some data that is requested by Google Structure tool then ideally all data to be passed to Google and not allow any chance for bad SEO for your website.

Which file to be modified in order to fix these warnings

To resolve these warnings we need to make necessary changes on your article detail page.

File to be modified under default WordPress theme

If you are running a wordpress website then by default wordpress uses “single.php” file that exist under your wp-content/themes/your-theme-name/single.php.

File to be modified under customized or third party wordpress theme.

Although each customized or third party uses their own template if its not using single.php file. In that case you need to identify the php file that is being used for post detail page. For example itheme2 theme of worpress uses loop.php file to show article detail page. Instead of single.php file that default wordpress uses.

  • How to fix Warning: Missing required field “entry-title”.

Check your post’s title HTML. You might see something like

<h1 class="title single-title"><?php the_title(); ?></h1>

You need to replace it with

<h1 class="title single-title entry-title "><?php the_title(); ?></h1>

Here one thing is notable that we don’t need to remove any existing class . Instead of removing the class we need to add our class only otherwise we might see some break in design as well.

  • How to fix Warning: Missing required field “updated”.

You might see some code on your page like

<span class="post_date"><?php the_time('j F,Y'); ?></span>

To fix this warning we need to add another attribute named “date updated”. So your new code would be like below:

<span class="post_date date updated"><?php the_time('j F,Y'); ?></span>
  • How to fix Warning: Missing required hCard “author”.

You will see some code like

<span class="theauthor"><?php the_author_posts_link(); ?></span>

or

<span class="theauthor"><?php the_author(); ?></span>

replace it with

<span class="vcard author">
<span class="fn"><?php the_author_posts_link(); ?></span>
</span>

or

<span class="vcard author">
<span class="fn"><?php the_author(); ?></span>
</span>

You can check now your page’s structure data at http://www.google.com/webmasters/tools/richsnippets

How to fix “This is not a verified publisher markup.”

There are 2 ways to verify the identity of publisher.

1) Webmaster linking:

For webmaster linking you need to visit Google My Business and create a new Google plus page with your contact number . From here you will get a new page URL . Only this ulr would be verified URL for publisher.

2) · Direct linking: This page url would be used at your website like

<a href=”https://plus.google.com/{+PageId}” rel=”publisher”></a>

For more detail you can go through https://support.google.com/business/answer/4569085?hl=en

The following two tabs change content below.

Chandra Shekhar

GCP Architect
Chandra Shekhar Pandey is Google certified Cloud engineer, I am Magento2 Trained developer. Having huge experience in designing cloud solution. I have around 12 years of experience with world enterprise IT companies and fortune 500 clients. During my architecture design I am always caring about high availability, fast performance and resilient system. From the programmer background I have huge experience in LAMP stack as well. Throughout my carrier I have worked on Retail, E-Learning, Video Conferencing and social media domain. The motive of creating cutehits was just to share the knowledge/solutions I get to know during my day to day life so that if possible I can help someone for same problems/solutions. CuteHits.com is a really a very effort for sharing knowledge to rest of the world. For any query/suggestion about same you can contact me on below details:- Email: shekharmca2005 at gmail.com Phone: +91-9560201363

Latest posts by Chandra Shekhar (see all)

You may also like...