I don’t think it’s new, but I just found Blogger’s “Reaction” widget. I’ve been interested in adding something similar to Facebook’s “Like” feature and what do you know? Blogger was way ahead of me.
How To Add
In Blogger, go to (1) Layout (2) Page Elements and in your “Blog Posts” module click (3) Edit.
By default, Blogger gives you 3 categories: Funny, Interesting, Cool. You can add more or remove some if you want. In my case, I only wanted one; a “Like” button.
If I kept everything as the default settings, it would give me something that looks like the first image shown in this post. Not quite a “Like” button, so I had to edit the code myself. To do so, I made only one category simply labeled “Like” and after saving all my progress, I moved into the “Edit HTML” module. I clicked “Expand Widget Templates” to show all the code. This line of code was made from the settings I had just set up:
It’s a little messy and it had some things in there that I didn’t want. The following line is the code that renders the word “Reactions” (or whatever you decide to name your categories). In my scenario, I didn’t want it shown at all, so I just deleted the line:
Some of the other code was formatting for tables. Since I only have 1 box, I don’t need to worry about how multiple boxes will look. With that said, I cleaned the code even more. This is the final code that simulates the “Like” feature I was going for:
<span class='reaction-buttons'><b:if cond='data:top.showReactions'>
<iframe allowtransparency='true' class='reactions-iframe' expr:src='data:post.reactionsUrl' name='reactions' scrolling='no'/></b:if></span>
Leave a Reply