For those who don’t know what authorship is: Authorship is used for displaying small avatar of the author in google search results.
Hi everyone i want this to get officially updated in next version of wallpress the thing is when we use structured data testing tool for testing authorship after applying authorship to any wordpress theme we used to get few warnings which after the new update from google has now turned into errors and even though when they used to be the warning google used to show author images in reuslts but now it has stopped doing that until the following errors are resolved .The error you get are
Error: Missing required field “entry-title”.
Error: Missing required field “updated”.
Error: Missing required hCard “author”.
as shown in screen shot below.
Now lets see how to resolve them :
For most of the wordpress themes You need to tweak your single.php file. On your WordPress dashboard, go to Appearance > Editor > Single.php
If you are a wallpress user like me read the block quote at the last of this question.
Fix Missing required field “entry-title”
Your title code should have the “entry-title” class. Normally yow would see
<h1 class=”title single-title”><?php the_title(); ?></h1>
you cannot remove or replace the “title single-title” attribute. Removing it would break your single.php page title’s CSS. What you can do is add the word “entry-title” and your code should look like
<h1 class=”title single-title entry-title”><?php the_title(); ?></h1>
Fix Missing required field “updated”
look for the code below on your WordPress theme’s single.php file.
<span class=”post_date” ><?php the_time(‘j F,Y’); ?></span>
then add “date updated” attribute to it. Your code should look like
<span class=”post_date date updated”><?php the_time(‘j F,Y’);?></span>
Fix Warning: Missing required hCard “author” and Missing required field “name (fn)”
This will fix these 2 warnings. On your WordPress theme’s single.php file, look for
<span class = “theauthor”><?php the_author(); ?></span>
replace it with
<span class=”vcard author”>
<span class=”fn”><?php the_author(); ?></span>
But as wallpress theme uses custom templates the code which needs to be tweaked is in
The thing is you need to find three kewords using ctrl+f these are
<?php the_author(); ?> and then wrap it into span pags with <span class=”fn”> and <span class=”vcard author”> similarly the
<?php the_title(); ?> and the
Be careful Make a backup before starting this procedure because if things don’t go as planned your site might crash.
I hope designwall team members will find it useful and help there theme users get these error resolved automatically with this included in there next wallpress theme updates