wordpress gravatar webmaster tool error fixed

We were testing our website with Structured Data Testing Tool and we got wordpress gravatar webmaster tool error. We found way to fix issue.

We tried to test following page.

http://purabtech.in/how-to-use-smart-posts-widget-wordpress-plugin/

But we got following Error in Extracted structured data section.

Extracted structured data
hcard
photo:
http://0.gravatar.com/avatar/adf2b1e1441486ca8a165815d87c598e?s=50&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D50&r=G
Error: This information will not appear as a rich snippet in search results, because it seems to describe an organization. Google does not currently display organization information in rich snippets
Error: Missing required field “name (fn)”.

Error will look like as follows:

wordpress gravatar webmaster tool error

wordpress gravatar webmaster tool error

How to fix wordpress gravatar webmaster tool error?

Open comments.php file which you can find in your theme folder. If you are using custom function for comments than check functions.php file. above error coming due to “hcard” tag which will in your comments.php. hcard used in gravatar image tag.

Find following code in your theme files


<div class="comment-author hcard">
<?php echo get_avatar( $comment, 50 ); ?>
</div>
<!-- .comment-author -->

Replace with following code.


<div class="comment-author">
<?php echo get_avatar( $comment, 50 ); ?>
</div>
<!-- .comment-author -->

As per webmaster tool, we need to use hcard tag for only author. So for commenter remove hcard tag. There are many types of error can triggered on webmaster tool. If you want to solve errors than use seo meta tags wordpress plugin. This plugin will add most useful and seo friendly meta tags to you wordpress site.

In next article we will tell you about more webmaster errors which are as follows:

Error: rel attribute in a non-anchor/non-link tag.
Error: rel missing href attribute.
Error: Missing required field “entry-title”.
Error: Missing required field “updated”.
Error: Missing required hCard “author”.

We solved all above errors. In next article we will give you detailed information about solving above errors.

2 Comments

Add a Comment

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