Link authors' names & profiles on a team blog with blogger

  • Buffer
  • Sharebar
  • Buffer
Lena's picture

If you have several people posting to a blog, you might want to set it
up so that each person's name at the end of their posts links to their profile. Here's how to make it work:
First, what you'll have to do is get the profile addresses for each person who will be posting to the blog. You'll notice that each one looks something like this: http://www.blogger.com/profile/XXXXXXX where "XXXXXXX" is a particular ID number. Make a note of that number for each person.
Next, add the following code to your template, between the HTML tags:
var team = new Array();
team["First Member"]="XXXXXXX";
team["Second Member"]="YYYYYYY";
team["Third Member"]="ZZZZZZZ";
function makeprofilelink (authorname) {
var pid = team[authorname];
document.write("" + authorname + "");
}
Read More

Replace "First Member" with the name that appears on the first member's posts, and replace "XXXXXXX" with the ID number corresponding to that person's profile. Repeat for the second member and so on, adding as many more lines as you need.
Now, look at the section of your template between the tags, where the posts themselves are displayed. There you should be able to find the <$BlogItemAuthorNickname$> or tag, depending on what kind of template you have. This prints out each persons display name. Replace that tag with the following:
(for classic templates)
makeprofilelink("<$BlogItemAuthorNickname$>");
(for layouts)
makeprofilelink("");
When you're all done, preview it to make sure it works, then save the changes and republish. The result will be something like this at the end of each post, with the appropriate profile link for the name:

... blah blah blah and that's the end of my post.
# posted by Lena at 4:14 pm.