VIEW ALL GALLERY LIGHTS

Friday, October 30, 2009

Tip to Insert link to profile of author in author name of each post

Thank Fatih for asking me about inserting link to profile of author . Finally ,I found a way to do it


Here is picture in site of Fatih ,and he want to insert link to author profile in Author name where the arrow is pointing to .
To do this ,follow some steps bellow :
1,Find this line in template : <data:post.author/>
2,Replace it with :
<b:if cond='data:post.author == "AUTHOR1"'>
<a href="Link_to_author1_profile"><data:post.author/></a>
</b:if>

<b:if cond='data:post.author == "AUTHOR2"'>
<a href="Link_to_author2_profile"><data:post.author/></a>
</b:if>

Author1 and Author2 are name of authors in your blog ,and you must replace it exactly with name of authors ,if name of author have special characters,it will cause errors ,so the best way is encode it . Goes here to encode

Link to author1_profile and Link_to_author2_profile are link to authors profiles in Google blogger .
if you have more than two authors ,you can insert more structure
<b:if cond='data:post.author == "AUTHORxxx"'>
<a href="Link_to_authorxxx_profile"><data:post.author/></a>
</b:if>

Hope this tips helpful to you .

huy signature

No comments:

Post a Comment