Member Fonts Amongst Colors On Squad Blogs.
In this tutorial I volition exhibit y'all how y'all tin hand the axe accept dissimilar fonts with colors for squad members on a teamblog.
It is a unproblematic hack, slowly to install to your blog, together with much asked for!
In this tutorial nosotros volition assume that y'all accept a teamblog amongst two squad members (Barbie together with Ken). We volition alter the font color of the ship service body. Barbie's posts volition endure inward red, Ken's volition endure inward blue.
Edit your Blog's template inward HTML-mode, together with expand all widget teamplates.
Inside the peel of your spider web log (that is betwixt the <b:skin> together with </b:skin>-tags), add together the next styling definitions:
.post-body-barbie { color:#ff0000; }
.post-body-ken { color:#0000ff; }
Now scroll downward to the widgets-part of the template, together with uncovering the post-includable. Look for the next lines of code:
<b:includable id='post' var='post'>
....
....
<div class='post-header-line-1'/>
<div class='post-body'>
<p><data:post.body/></p>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
<div class='post-footer'>
....
....
</b:includable>
What y'all meet hither is a post-header work (which is empty), the post-body, together with the starting fourth dimension work of code for the post-footer. Now nosotros volition alter this code, together with thus that Barbie together with Ken each accept their ain color:
<b:includable id='post' var='post'>
....
....
<div class='post-header-line-1'/>
<b:if cond='data:post.author == "Barbie"'>
<div class='post-body-barbie'><p><data:post.body/></p>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
<b:else/>
<div class='post-body-ken'>
<p><data:post.body/></p>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
</b:if>
<div class='post-footer'>
....
....
</b:includable>
Now salve the template.
If y'all accept to a greater extent than than two squad members, the regulation is the same: y'all simply accept to add together approximately extra if-else statements, that are nested.
Comments
Post a Comment
Ask me anything here...