How to Create Google Author Profiles for Thesis on WordPress

Having a verified author profile picture appear next to your articles that show up in search results is a new feature Google recently added. In this post, I’m going to show you how to add the functionality to your thesis theme in WordPress.

If you’ve never seen a verified author profile in Google results, here’s an example.

A verified Google Author Profile in SERPs

Adding a link to your Google Plus page

Step one. You will need a Google plus profile. If you don’t have one, you’ll need to create one and fill out the “about” section. You’ll also need to add a link to your author profile in WordPress. When you you add the link, make sure you check the box that says “This page is specifically about me” (see screen shot at right).

Step two. You will need to edit the link to your author page. I use a custom function in Thesis, so you’ll have to make sure the default author link is turned off. First, go to Thesis > Design Options > Display Options and uncheck the author section.

Turn off Default Author Links

Then open up custom functions. If you don’t have a function for the author by line, create one.

function uauthor_byline() {
}

(note–all the code will be in one text file at the end since WordPress occasionally munges code).

Next add in the link to author section for single post pages.

function uauthor_byline() {

//how many days old is this post
$daysold = (current_time(timestamp) – get_the_time(‘U’) – (get_settings(‘gmt_offset’)))/(24*60*60);

if (is_single()){
?><p class=”headline_meta” ><span class=”author vcard” >By <?php the_author_posts_link();
echo ” on “;
//how many days old is this post
$daysold = (current_time(timestamp) – get_the_time(‘U’) – (get_settings(‘gmt_offset’)))/(24*60*60);
if ($daysold < 180){
echo the_date(‘F j, Y’);
} else {
echo the_date(‘F Y’);
}
echo ‘</span> ‘.edit_post_link(‘edit post’,’ [‘,’] ‘).'</p><hr>’;

}
}

Then add the rel=author tag.


?><p class="headline_meta" ><span class="author vcard" rel="author">By <?php the_author_posts_link();

Make sure you are calling the function.

add_action('thesis_hook_before_post','uauthor_byline' );

At the time this tutorial was written, WordPress strips out the rel link tags, so we need a workaround. This one is provided by Joost de Valk (thanks Joost).

add_filter('thesis_archive_intro','hide_author_intro_headline');
function yoast_allow_rel() {
global $allowedtags;
$allowedtags['a']['rel'] = array ();
}
add_action( 'wp_loaded', 'yoast_allow_rel' );

Next you need to add information and a link to your Google profile. You can add it to the profile in your WordPress user profile, but it will strip out the formatting and force everything into one paragraph.

To fix this problem, you can use the cimy extra fields plugin and add 4 fields to the user profiles.

CIMY extra User fields

Then you need to go back to the custom functions file and add this info for the author profile to show the cimy fields.

// Author Archive Page
function author_info() {

if (is_author())
{
?>
<?php
$curauth = (get_query_var(‘author_name’)) ? get_user_by(‘slug’, get_query_var(‘author_name’)) : get_userdata(get_query_var(‘author’));
?>
<div class=”authorarchive”>
<h4><?php echo $curauth->first_name; ?> <?php echo $curauth->last_name; ?></a></h4>
<?php echo get_avatar( $curauth->ID , 120 ); ?><p><?php $value = get_cimyFieldValue( $curauth->ID , ‘LONG-BIO’);
echo cimy_uef_sanitize_content($value); ?></p>
<p><?php $value = get_cimyFieldValue( $curauth->ID , ‘LONG-BIO-2’);
echo cimy_uef_sanitize_content($value); ?></p>
<p><?php $value = get_cimyFieldValue( $curauth->ID , ‘LONG-BIO-3’);
echo cimy_uef_sanitize_content($value); ?></p>
<p><?php $value = get_cimyFieldValue( $curauth->ID , ‘LONG-BIO-4’);
echo cimy_uef_sanitize_content($value); ?></p>
<p><?php $value = get_cimyFieldValue( $curauth->ID , ‘LONG-BIO-5′);
echo cimy_uef_sanitize_content($value); ?></p>
<?php
$artnum = count_user_posts( $curauth->ID );
$arttext = “article”;
if ($artnum > 1){$arttext = “articles”;}
?>
<p class=”hlight”><?php echo $curauth->first_name; ?> has written <span><?php the_author_posts(); ?></span> <? echo $arttext ?> for Graywolf’s SEO Blog.
</div>
<?php
}
}

// Hide Author Archive Page Hide Headline
function hide_author_intro_headline($output) {
if (is_author()) {
$output ='<br/>’;
}

return $output;
}

 

Call the function:

add_action('thesis_hook_before_content', 'author_info');

And I added a little CSS for styling.

/* Archive Intro */
.custom #archive_intro { background: #fff; border: 1px solid #ddd; width: auto; margin: 0 0 30px; padding: 20px 30px 18px; margin-right: 23px; }
.custom #archive_intro h1 { border-bottom: 2px dotted #ddd; font-weight: bold; }
.custom.author #archive_intro h1 { margin: 0; padding: 0; border: 0; text-transform: uppercase; font-size: 20px; font-weight; bold; }
.authorarchive { background: #fff; border: 1px solid #ddd; padding: 30px 30px 10px; margin-right: 23px; margin-bottom: 20px; font-size: 14px; }
.authorarchive h4 { font-size: 30px; font-weight: bold; border-bottom: 2px dotted #ddd; margin-bottom: 20px; padding-bottom: 3px; }
.authorarchive img { float: left; padding: 8px; background: #fff; border: 1px solid #ddd; border-left: 1px solid #eee; border-top: 1px solid #eee; margin-right: 15px; margin-bottom: 15px; }
.authorarchive p { font-size: 14px; margin-bottom: 20px; line-height: 1.4em; }
.authorarchive p.hlight { font-weight: bold; }
.authorarchive p.hlight span { color: #073d9f; }

When you are writing your profile, one of the issues I had was using the [rel=me] tag more than once on a page, causing problems. Additionally, Google doesn’t like the rel=me link pointing to anything but your Google profile. I hope this is a programming oversight and not a Google business decision–’cause, if it is. it sucks. Just sayin…

You can verify that you have all the information correct with the rich snippet tool. Once you do, make sure you submit the form for author profile as well. It seems to speed up the process. When I checked it with the tool, it initially said ok, but nothing happened for 3 weeks. A few others complained that Google updated the verification tool, and I was now failing. Once I fixed the multiple “me” problem, it only took a week for the enhanced listing to appear. The process appears to take some time, so be patient. The sooner you start, the better.

You can download the text file with all the thesis code here.

If you want to use this tutorial, it works best with the Thesis Theme. If you purchase from that link, I do receive a commission; however, I use Thesis on this website and many others and am very comfortable recommending it. If you want to spend less time playing with Theme and more time creating content, Thesis is an excellent platform to do it on.

photo credit: Shutterstock

GraywolfSEO.com runs on the Genesis Framework

Genesis Framework

Genesis lets you to quickly and easily build amazing websites with WordPress. Whether you're a novice or advanced developer, Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.
It's that simple - start using Genesis now!


Take advantage of the 6 default layout options, comprehensive SEO settings, rock-solid security, flexible theme options, cool custom widgets, custom design hooks, and a huge selection of child themes ("skins") that make your site look the way you want it to. With automatic theme updates and world-class support included, Genesis is the smart choice for your WordPress website or blog.


tla starter kit

Advertisers:

  1. Text Link Ads - New customers can get $100 in free text links.
  2. BOTW.org - Get a premier listing in the internet's oldest directory.
  3. Need an SEO Audit for your website, look at my SEO Consulting Services
  4. TigerTech - Great Web Hosting service at a great price.