If you have a Team Blog made up of two authors you can change the formatting of the posts written by one author to differentiate them from the other author's posts. In a Team Blog the About Me Profile widget is replaced by a Contributors List widget. This lists the name of the authors linked to their profiles.
Note down the names since we will use one of them in implementing this hack...........Step 1. DEFINE THE STYLE
The style of the text and the background color are defined in the CSS Part of the Template. So we will paste the following code in the Template (You can add more style parameters if you want to) :
#author1 p{
margin:.25em 0 0;
color:#CC3300;
text-decoration:bold;
background:#aad4ff;
}
Login at Blogger.com and click Layout link on Dashboard. On Page Elements tab click Edit Html subtab of Layout tab. In Edit Html tab click Download Full Template link to backup your Template to PC. Copy and Paste the code given above immediately above ]]></b:skin> tag in the Template Code box. Save Template. Step 2. IMPLEMENT THE STYLE
First step here is to expand the Widgets Template. To do this click the Expand Widgets Template Checkbox on top right of the Template Code box. Scroll down in Template Code box to this code in the Blog Posts expanded widget code :
<div class='post-header-line-1'/>
<div class='post-body entry-content'>
<div class='post-body'>
<p><data:post.body/></p>
CHANGE ABOVE CODE TO :
<div class='post-header-line-1'/>
<div class='post-body entry-content'>
<b:if cond='data:post.author == "vin"'>
<div id='author1'>
<p><data:post.body/></p>
</div>
<b:else/>
<p><data:post.body/></p>
</b:if>
Instead of 'vin' put in the profile name of an author of the blog EXACTLY AS IT APPEARS ON THE CONTRIBUTOR's LIST WIDGET ON THE BLOG.
Save Template. Clear Cache and View Blog.
You are here: Home > Template > Change Post Formatting According to Author.
Change Post Formatting According to Author.
Change Post Formatting According to Author.New Visitor? Like what you read? Then please subscribe to my Blog Feed or sign up for Free Email Updates. Thanks for Visiting!
Posted by Vin
What have you to say?
7 VIEWERS CLICKED HERE TO COMMENT ON THIS POST. ADD YOUR COMMENT.
EMail this post to a friend?
Filed Under :
Labels: Author, Blog Posts, Blog Posts widget, CSS, Template |Bookmark This Post
Skip to top of post.
YOUR COMMENTS
Buy Vin a Beer :-) if you liked this post.
Search Blog Before Commenting
Post a Comment
Please use the above search box to search this blog before posting your valuable comments.
Comments posted on Dummies Guide to Google Blogger (Beta) are moderated and will be approved only if they are on-topic and not abusive. Try not to include website URLs/links in your comments. You can email me : drbhatns at gmail dot com for any blogging question. Thanks,
Vin.














7 comments:
Hey this is pretty cool, thanks!
I'm planning on setting up a blog with a few different authors, and this fits the bill nicely!
I would not of accomplished anything if I did find your site.
This is by far the BEST site on the Net!
thank you' newbieblogs-naive@blogspot.com
Thank you for these tips. I will definitely utilize some of these.
I've been stumped why my blog (http://night-collection.blogspot.com) is not ranked, yet my photo site (www.naturalabstractions.com) is 2/10, when my blog gets a lot more traffic than the photo site.
It seems to me like blogs on xxxx.blogspot.com typically have a lower rank than self-hosted blogs. Is this true? I am basing that off of nothing but my own experiences.
Scott,
If you are talking of Google Page Rank, it is based on how many quality blogs/sites have linked to your site.
See How to Increase Google Page Rank.
This works when there are two members. But I have a blog with three members, and I can't get it to work properly. I set up the styles for each of author1 and author2 just above the "b:skin" code. And then I replaced the lines of code with the new lines, with the name of author1 replacing "vin". Works well. But then I'm stumped.
If the post is by Author1, I want the text to be green. If it's by Author2, I want the text to be red. And if it's by anyone else, I want the text to be the default color. Using your example, I can get Author 1 and the default to work. But I can't figure out how to get Author2 to work. Everything I try is giving me really unusual results. What do I do?
Thanks for your help.
Howard,
Try the loop statement :
<b:loop values='data:post.author' var='author'>
....
</b:loop>
I looked up this advice, because I'm thinking of consolidating my separate blogs into one blog with posts. I now realize that I would have to give up my individual formatting of each blog, so perhaps I'll stay put. In general, messing with html in the template "scares" me. But I will tame myself and get familiar. It is very useful and liberating. Thank you.
CLICK TO LEAVE A COMMENT..... :-)
Skip to top of post.
Who is talking about the above post?