Team Blog:-Linking Post author to respective Profile

If you are the only person contributing to your blog,.. then it makes sense to see that the POSTED BY <your name> is a static as a simple piece of text and does not link to any webpage. However, if the blog is a team blog … then each post will have the post author’s name displayed at the bottom of the post.. like POSTED BY <Post_author>.

By default this is also a static text and does not link anywhere. Wouldn’t it be a lot more better that the profile of each author is linked not only at the contributors section , but also at the posts that he / she writes. If a certain post is liked by a reader.. he would want to know more about the author… So lets give the reader the opportunity to know-the-post-author at the click of a mouse.. without having to scroll though the long list of widgets in the sidebar in order to locate the contributor’s list…Want to know how ???

Assuming that you know the profile URLs of the people contributing to your blog
STEP :- 1 A closer look at the PROFILE-URL
Example:- This is my profile URL
Deepa :- http://www.blogger.com/profile/08368941819092880320 where 08368941819092880320 is my Profile ID or the pID.
Every profile url is in this format.. so before advancing further to implement this hack.. I recommend that you prepare a list of contributors to your blog and their respective pID as shown below ..donot forget to see the Picture for reference

Team_Member ( use the name in the profile )
pID ( use pID number)

Team_Member 1 : pID
Team_Member 2 : pID
Team_Member 3 : pID
Team_Member 4 : pID
Team_Member 5 : pID
Team_Member 6 : pID

Save this notepad as a precaution

STEP:-2 Copy the following code in a (new ) Notepad… You will be editing this

<script type=’text/javascript’>
var team = new Array();
team[‘
Team_Memeber 1 ‘]=’ pID number ‘;
team[‘Team_Memeber 2‘]=’pID number‘;
team[‘Team_Memeber 3‘]=’pID number‘;
team[‘Team_Memeber 4‘]=’pID number‘;
team[‘Team_Memeber 5‘]=’pID number‘;
team[‘Team_Memeber 6‘]=’pID number‘;
NOTE:- There must not be any space between the singlequote and the name / ID characters. Orelse, this hack will not work
function makeprofilelink (authorname)
{
var pid = team[authorname];
document.write(“<a href=’http://www.blogger.com/profile/” + pid + “‘>” + authorname + “</a>”);
}
</script>

Replace the Team_Memeber names and the pID number Profile Numers…. then copy paste the code into the template just above the </head> tag

STEP:-3 Locate the following code in the template

  1. Locate the following code in your template
    <b:if cond=’data:top.showAuthor’>
    <data:top.authorLabel/>

    <data:post.author/>
    </b:if>
  2. Replace the <data:post.author/> with
    <script type=’text/javascript’> makeprofilelink(‘<data:post.author/>’);
    </script>
  3. Now, your final Template code at this position must resemble something like this
    <b:if cond=’data:top.showAuthor’>
    <data:top.authorLabel/>
    <script type=’text/javascript’> makeprofilelink(‘<data:post.author/>’);
    </script>

    </b:if>

STEP:-4
Save and view your blog.. Each post author is now automatically linked to his/her profile beneath every post.

If you are glad in using this hack.. and appreciate my effort.. please do link back to me..
Your appreciation is my motivation
The code for this at blogger help has bugs and does not work

2 Replies to “Team Blog:-Linking Post author to respective Profile”

  1. I’ve tried your version as well as the one on blogger help but instead of getting a link from the name to the profile – the name of my team member just disappears! Do you have a blog where I can see this working?

  2. Wild .. you can see the working example blog to get an idea

    These are the possible errors due to which the code does not work.. to do check them up.

    In.. team[‘ Team_Memeber 1 ‘]=’ pID number ‘;
    Here, there is one-space after and before the single quote. So try deleting the space.. so that the final thing looks like
    team[‘Team_Memeber 1′]=’pID number’;

    Did you add the correct pID for respective authors ?
    Are you using the same name in the array.. as the name displayed in the respective profiles ?
    Did you add the script code above the </head> tags ?

    Hope this helps

Leave a Reply

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