How to Fix Google Authorship Markup Warnings for Wordpress and Blogger users.
Fix Google Authorship Markup Warnings |
Google Authorship markup Warning shown in your blog [eg. Blogger and Wordpress] when you're handle a 'Rich snippet testing tool' or Structured Data Testing Tool. This tool generally use for check and markup structured data of your blog. When you're use this tool , if you're showing this type error and warning message your result table -
‘Warning: Missing required field “updated” and ‘Warning: Missing required hCard “author”
Now , take a step for correct or fix these markup warnings and errors? Yes, it is. Then how to fix these markup warnings and errors? There are two ways to fix these markup to get better search engine presence with Google Authorship program because participation in this must increase you click-through rate (CTR). This post will guide you how resolve authorship markup warnings and errors for Blogger/Wordpress hosted blogs.
How to FIX Google Authorship Markup Warnings in Blogger
If the tool is unable to extract information of all three fields from webpage it shows following warnings in Blogger blog -
If Google Rich Snippet Tool is able to extract information from one or two fields it shows warning for only missing fields.
Solution:
First Method:
- Here we look for first method to correct Authorship markup warnings and error in Blogger template
- Go to Blogger Dashboard › Select Blog › Click on Template › Proceed › Edit HTML
- Search for ‘hfeed‘ and ‘hentry‘ one by one and rename all instances those exist in template with ‘h-feed‘ and ‘h-entry‘ respectively.
- Save template and now check for authorship markup warnings and errors with Rich Snippet testing tool.
- End.
Second Method:
- Now we move to second method which is slightly difficult from first one.
- Go to Blogger Dashboard › Select Blog › Click on Template › Proceed › Edit HTML
- Now you have to search one of the following codes or similar that might be little different from these.
- Now concentrate on the highlighted parts ‘timestamp-link‘ and ‘published‘. You have to change these values with ‘updated‘ for all instances present in your Blogger template.
- After successful completion of entire task please save the changes made in Blogger template and now check for Authorship markup warnings and errors with Rich Snippet testing tool.
- End.
Code I.
<a class='timestamp-link' expr:href='data:post.url' rel='bookmark' title='permanent link'><abbr class='published' expr:title='data:post.timestampISO8601'><data:post.timestamp/></abbr></a>
Code II.
<a class='timestamp-link' expr:href='data:post.url' itemprop='url' rel='bookmark' title='permanent link'><abbr class='published' expr:title='data:post.timestampISO8601' itemprop='datePublished'><data:post.timestamp/></abbr></a>
Note: Before making any changes to the template please take the backup.
How to FIX Google Authorship Markup Warnings in Wordpress
When using the Google Rich Snippet Tool a warning of hatom-feed shows up in Extracted structured data section if the tool is unable to extract the information “entery-title”, “updated” and “author” from the webpage you are testing.
If the tool is unable to extract information of all three fields from webpage it shows following warnings;
Warning: At least one field must be set for HatomEntry
Warning: Missing required field “entry-title”.
Warning: Missing required field “updated”.
Warning: Missing required hCard “author”.
If Google Rich Snippet Tool is able to extract information from one or two fields it shows warning for only missing fields.
Solution:
You need to provide rich snippet tool these three fields to remove these warnings. WordPress users need to modify single.php in their theme folder to remove this warning.
Fixing Warning: Missing required field “entry-title”:
The title of your post which is mostly enclosed in header tags needs to include a class attribute. If it already has a class attribute then append “entry-title” without quotes to it.
<h1 class="entry-title">Page Title</h1>
For WordPress users:
Open single.php located in your theme folder and find. If it is not enclosed in header tag then wrap it into a header tag and add class attribute with value “entry-title”.
<h1 class="entry-title"><?php the_title(); ?></h1>
Fixing Warning: Missing required field “updated”:
To remove this warning you need to have a date of content update. The date needs to be closed in a span tag with attribute.
<span class="date updated">Date</span>
For WordPress users:
In your single.php file find the_time or echo get_the_date(); and enclose it into a span tag with attribute.
<span class="date updated"><?php echo get_the_date();?></span>
Or
<span class="date updated"><?php the_time(); ?></span>
Fixing Warning: Missing required hCard “author”:
To fix the missing hCard “author” warning add enclose the author name into following span tags.
<span class="vcard author">
<span class="fn">Author Name</span>
</span>
For WordPress users:
In single.php find the_author(); or the_author_posts_link(); and replace it with anyone of following lines.
<span class="vcard author">
<span class="fn"><?php the_author(); ?></span>
</span>
0 comments:
Post a Comment