Previously, I showed you how to highlight your author comment. If you use that Highlight Author Comment trick exactly on your multi-author blogs, it only works for the person who made that post. So, if you are an author, but you didn't make that post, when you make a comment on that post, your comment will look the same as your visitor's comments. So, to fix this problem on multi-author blogs. You have to modify that code slightly. Remember, if you already made the change on your template by following this highlight trick. You have to undo it before you follow the following instruction:
- Login to your account --> Design --> Edit HTML
- Click on "Download Full Template" to backup your template.
- Check "Expand Widget Templates"
- Search for
- Cut that code to your notepad or any code editor to modify that code
- Now, we are going to use nested if statement to make it support multi-author, please look at the following code to modify your code accordingly. This code will support 2 authors, you can extend the number of if statement to support more author.
- The same as before, you need to update your CSS, search for
- And add the following code before it
- Save your template, and you are done.
<dd class='comment-body'>
<b:if cond='data:comment.isDeleted'>
<span class='deleted-comment'><data:comment.body/></span>
<b:else/>
<p><data:comment.body/></p>
</b:if>
</dd>
<b:if cond='data:comment.author == "First author name here"'>
<dd class='comment-author-wrapper'>
The read code above here
</dd>
<b:else/> <b:if cond='data:comment.author == "another author name"'>
<dd class='comment-author-wrapper'> The read code above here </dd> <b:else/> Your original code, the code you just cut out </b:if>
</b:if>
]]></b:skin>
.comment-author-wrapper{background:#000099; border:1px solid #000099; padding:0.5em; margin-bottom:5px}
Remember to change the CSS code to make it work on your template, such as the color that I bold red above.
If you see my post interesting, please comment :-)
0 comments:
Why not leave a comment? No matter what, I'd love to hear from you!
Post a Comment