Fix Google Webmaster Missing: author error in single.php
-
Hi,
Trying to edit our theme to solve the google webmaster error for “Missing: author”
I found elsewhere that
<span class="vcard author"> <span class="fn"><?php the_author(); ?></span> </span>
should replace
<span class="theauthor"><?php the_author(); ?></span>
in single.php. But our author entry is a bit more complicated (see below). Could anyone suggest how to modify our code to make it google compliant?
<?php printf(__('<span class="by-author"> <span class="sep"> by </span> <span class="author vcard">%3$s</span></span>', 'twentyeleven'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'twentyeleven'), get_the_author())), get_the_author() ); ?>
Many thanks for any advice. Best,
Mark
- The topic ‘Fix Google Webmaster Missing: author error in single.php’ is closed to new replies.