Adding Author Authority (rel=”author”) To WordPress – Plugin Required?

I decided to have a play with adding the new Google Author Rel=”author” attribute to WordPress. It is really very simple to do with WordPress out of the box, although an old plugin is needed for a basic set up to work, but it is a one click install and activate job (UPDATE – a plugin may not be required any more, see comments below. Not tested yet).

First you need to create your author page which for a small blog can just be your current About page if you do not wish to make a new one – I will use my About page as an example. I do not see any point in creating a new one, not just yet at least. Update: JohnMu suggests using individual author pages unless you are the sole writer of a site.

So next up is to make use of your WordPress profile “Biographical Info” box. In that you can simply write something like:

This entry was written by <a rel="author" href="http://www.webologist.co.uk/about">Webologist</a>.

Then in your theme template files you need to add the following code, ideally just at the bottom of your articles. In some themes this will be in the single.php (and page.php) files, in some it may be in functions.php or loop.php. Depends on the theme really.

In this theme (Magazine Basic) I have placed the code at the top of comments.php so that the profile link appears immediately after the content and before the comments.

If it was placed in single.php it would appear at the bottom of the comments and if in the loop.php you need extra WordPress markup code to stop it appearing everywhere. If you want the author info to appear after every category and tag excerpt then putting it in the loop.php is the simple solution.

Once you chose where to put it, this is the code:

<div class="postauthor"><?php the_author_description();?></div>

You can then also add some fancy styling in your stylesheet to the profile if you like.

WordPress Problem: rel=”author” not allowed in the Profile Box

But there is (or maybe was, this may no longer be a problem, see comment below from Luiz Marques) a problem. By default you cannot add rel=”author” to the user profile box. WordPress sees something that is not allowed and strips it out. This is where a plugin will be best to fix the issue so that you do not have to use an old and unsupported plugin which is not really ideal.

Here is how you allow rel=”author” in the WordPress profile box:

Weasel’s HTML Bios

There is a very old plugin which removes the stripping out of HTML from user bios. And it still works! The plugin is so old that the plugin website no longer exists. Here it is on WordPress: wordpress.org/extend/plugins/weasels-html-bios/

For some reason there are 2 versions which look identical listed in the WordPress plugins. I picked the second one and it worked OK. I added rel=”author” to the profile box and WordPress did not strip out the code.

A word of caution – the reason WordPress strips code out of the author box is so that your authors cannot sneak in some spammy or dangerous code when you are not looking. Remember, any code added with populate all articles written by an author and you do not get an alert when they change something. So someone could write 20 very nice posts then come back a month later and drop their links and ads in their box. So only use this on sites where you trust your writers!

Allow REL= and HTML in Author Bios Plugin

There is a new plugin that replaces Weasal’s somewhat open to abuse method, it is called Allow REL= and HTML in Author Bios. I just tested it and it works a treat.

Update: Just noticed that the Plugin page says “Enables use of REL= or anything else in Author bio area (for Google+ search results). WARNING: CAN BE USED FOR EVIL! Make sure you trust authors!

Sounds like it does the same thing as Weasal.

Anyway, as you can see just below is my little by line.

With this method each author will need to manually add the code (or ask the web admin to do it) and then link to an author profile page, that you will also need to create.

No doubt someone is creating a very snazzy WordPress Rel=”author” Plugin as I publish this.

7 Comments on “Adding Author Authority (rel=”author”) To WordPress – Plugin Required?”

  1. Great post! It could be enough for me modifying the_author() function for putting rel=”author” tag, but I can’t figure it out…

  2. Yeah, you could do that. That is OK if you only ever plan to write for your own blog, but it will make linking to other profiles using the rel=”me” attribute harder. I think that the idea from Google is that bloggers create a profile page for their blogs to add authority to the writers (aka author-rank, much like pagerank). You can then, maybe, boost other written content. e.g. if you write a blog that is well liked (lots of social buzz, links, readers etc) and then start another blog, or write as a regular guest on another blog, some of your authority may pass there, even if there is not much in the way of social buzz or traditional links to tell Google that the site has quality content.

    I like to think that this is an additional feature in the new Panda package from Google. Sites are ranked on more quality signals and this may include the quality of authors.

    Another way to look at it – if you have a blog that is not very well ranked and then you invite a very popular writer to contribute, your blog / website may then get a boost (if they link their author profile pages).

    None of this is possible just by using the WordPress author archive pages.

  3. Thanks for letting us know Luiz, I had not spotted that. This makes it much easier to implement.

  4. Thanks a lot. Helped a lot. 🙂 I was thinking of using a plugin. Seems it is not necessary. Funny thing is my author profile was shown before. Suddenly I notice it is gone. So tried out your thing. Hope it works 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *