Tuesday, 18 August 2009

ADD A ROLLOVER TO THE "COMMENTS" LINK

Here's how to add a rollover to your Comments link!

What is a rollover? Roll your cursor over the Comments link at the bottom of this post to see how it works. Isn't it great!






To do this, you'll have to grapple with the html, so the first thing to do is SAVE YOUR TEMPLATE! I download mine to my Desktop, so it's easy to find if I need reload it.















Go to Layout > Edit html and click on Expand html. On your keyboard, click CTRL + F, which brings up a box just above your bottom toolbar.

Copy and paste this bit of code into the little Find box (just above your bottom toolbar) and this segment will immediately highlight in your html box.















Copy&paste the highlighted code and change the message to one of your own if you prefer. Or just copy&paste this entire section (don't leave any spaces):
<b:if cond='data:blog.pageType != "item"'> <b:if cond='data:post.allowComments'> <a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick' title='Click here to view or write comments'><b:if cond='data:post.numComments == 1'>1 <data:top.commentLabel/><b:else/><data:post.numComments/> <data:top.commentLabelPlural/></b:if></a> </b:if> </b:if> </span>

Click Preview - this checks your code works and there are no errors (if there are, it won't publish and you can just Clear Edits. If you can see your preview (you won't be able to see if the code works in Preview unfortunately) you can trust that all is well, and click Save Template.











Here's how it will look in Real Life.

Isn't this a nice little gadget!

ADDENDUM:

KBeau says:
For everyone else who is having trouble seeing it, you have to be on the blog main page where all of the posts are and not the page where only one post is. When you pass over where it says "1 comment" or "2 comments" or such, then you get a pop up box that says, "Click here to leave a comment" or something like that.

post signature

your photo name

3 comments:

I absolutely love to receive comments!

But please note - I DO check for spam, and I moderate all comments - any spam is deleted at source.