In June 2011, Google announced its support of the “author” microformat.
WordPress has long supported author archives, which sites (especially those with multiple authors) can use to highlight an author’s work on the site, their biography, an author picture, or whatever else they wish.
Google’s recognition of the “author” tag allows them to link what you write on an “author”-enabled website to you by way of your WordPress author archive. To take this one step further, you can also link to your author archive on your Google profile.
The key to all of this is the “author” microformat, and adding it to your site is easy!
First, ensure that Thesis is set up to display author links. The relevant options are located in the admin panel under Thesis Design Options > Display Options > Bylines. Ensure that “Show author name in post byline” and “Link author name to archives” are checked; note that the latter option will not appear until you select the first.
Because the idea is to get Google to recognize your author archives to use as part of your online identity, do not check the “Add nofollow to author links” option.
Now, once that is complete and you have saved the options, open your Thesis custom_functions.php file, and add the following code:
/* Enhance bylines with the 'author' microformat */
function custom_headline_catcher() {
ob_start();
}
function custom_headline_catcher_end() {
global $thesis_design;
if ($thesis_design->display['byline']['author']['nofollow'])
$output = str_replace( 'rel="nofollow"', 'rel="nofollow author"', ob_get_contents() );
else
$output = str_replace( 'class="url fn"', 'class="url fn" rel="author"', ob_get_contents() );
ob_end_clean();
echo $output;
}
add_action('thesis_hook_post_box_top', 'custom_headline_catcher');
add_action('thesis_hook_before_post', 'custom_headline_catcher_end');
add_action('thesis_hook_before_teasers_box', 'custom_headline_catcher');
add_action('thesis_hook_before_teaser', 'custom_headline_catcher_end');
The final two lines of PHP add the Google rel=”author” markup to your teasers, too!