Rel=”Author” is a new standard Google brought in last year. You may have noticed the cool author pictures showing in some search results lately. This is how to get your own wordpress site to work like that.
Quite a few people have written general guides for this, but I couldn’t find any easy ones for WordPress.
To keep it as simple as possible, this guide is for people with a single author blog using a self-hosted wordpress installation.
You need three links for this to work:
- A link from your posts to your author page using rel=”author”
- A link from your author page to your Google+ page using rel=”me”
- A link in the profile section of your Google+ page to your author page.
Get A Google+ Account
If you haven’t already got a Google+ account, go to http://plus.google.com and sign up.
Create An Author Page
Build a page (not post) on your site that has a bit about you and why you’re writing for the site.
It’s a good idea to display some of your latest posts. To do this, get the Exec-PHP wordpress plugin. This will allow you to add php code within your posts and pages. Bear in mind that you have to put the php code in using the HTML tab. Switching to the Visual tab in WordPress will break the code, so keep a copy of any code you add.
Activate Exec-PHP, then go back to your Author Page and add this code to display your 5 last posts:
<ul>
<?php
global $post;
$args = array( ‘numberposts’ => 5, ‘orderby’ => ‘post_date’, ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’ );
$myposts = get_posts( $args );
foreach( $myposts as $post ) : setup_postdata($post); ?>
<li><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a><br /></li>
<?php endforeach; ?>
</ul>
If you already display your latest posts in your sidebar, you may want to have the next 5 after them on your Author Page. To do that, just add ‘offset’ => 5, to the above code after ‘numberposts’ => 5, .
Finally, add links to your social media profiles. Make sure one of them is to your Google+ page. The link for that has to be:
<a href=”https://plus.google.com/106324060302594483828/about” target=”_blank” rel=”me”>
Change the number in red to your Google+ number. The target=”_blank” is optional – it just opens the link in a new tab.
Add anything else you want that will help your readers to get to know you.
Save all that and publish it.
Change Author Link
First you need to change where the author link at the top of each post points. The standard Twenty Eleven theme already has this step in place.
If your sites runs on the Genesis template, put this code into your functions.php file. It will be under Appearance –> Editor (change the code in red):
// Change author archive link to author name
add_filter(‘genesis_post_info’, ‘post_info_filter’);
function post_info_filter($post_info) {
$post_info = ‘ By <a href=”http://yourdomain/author-page/” rel=”author”>Your Name</a>’;
return $post_info;
}
For most other sites, look at your single.php file to see how the author link displays. You’re looking for the_author_posts_link() or an <a href= that has get_author_posts_url.
Edit the link to point to your Author Page with rel=”author” in the <a> tag.
Google Plus Profile Link
Go to your Google+ Profile page (click your profile picture, then click About in the grey navigation bar). Click the blue “Edit” button.
On the right side, it should say “Other Profiles” or something like that. Click that, add your Author Page link and the name of your site, then click save.
And you’re done!
Go to http://www.google.com/webmasters/tools/richsnippets and paste in the urls to one of your posts to check that you’ve implemented it properly.
It should look something like:
Niall says
I was also trying to figure out how to this for my wife’s blog. I put a link on my sidebar with an about me widget that contains a rel=”author” tag. Seems to be implemented properly.
Mike Haydon says
As long as it shows up without errors on the rich snippets tool, you should be good to go.