Facebook Like Plugin For WordPress


WordPress users all know there are lots of plugins for WordPress and the Facebook Like plugin is no exception. When you do a search for the Facebook Like plugin, you are bound to come up with many results. I think most of them work the same way but the plugin I chose for my blog is by John Chadda.

Configuring it is every easy and you can either place the Like button manually anywhere in your blog or use the default settings that come with it. You can try other versions from other developers if you wish. I did not try them, only Chadda’s version.

It works pretty well. If someone clicks on the Like button, it will appear in their Facebook profile page that they liked your post.

Found this post useful? Buy me a cup of coffee or help support the sponsors on the right.

Create Facebook Like Button For Blogger Blogs


While there is no widget in Blogger that can let you place the Facebook LIKE button after your article (or wherever in the page), there is a way to manually set one up in your blog.

To do so, first go to your Blogger account, then follow the instructions below:

  • go to Design, then Edit HTML and click on the check box which says “Expand Widget Templates”
  • look for the tag <data:post.body/> and place the code (below) after it
  • save

<b:if cond='data:blog.pageType == "item"'>
<iframe allowTransparency='true' expr:src='"http://www.facebook.com/plugins/like.php?href=" + data:post.url + "&layout=standard&show_faces=false&width=100&action=like&font=arial&colorscheme=light"' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:450px; height:40px;'/>
</b:if>

The code above will display the Facebook like button in the article’s page only. If you want it to appear after every post, say, in your main page or search page results, then remove the 1st and last line marked red.

You can customize the code in a lot of other ways like changing the text from LIKE to RECOMMEND. Just change action=like to action=recommend. Color scheme can also be changed to colorscheme=light, colorscheme=dark or colorscheme=evil.

With this Facebook like button in your Blogger blog, whenever someone clicks on it, it will also appear in their Facebook profile page.

Found this post useful? Buy me a cup of coffee or help support the sponsors on the right.

MySQL: Using Column Name Inside The LIKE Keyword


When using the LIKE keyword, I always get to do it this way, LIKE (‘%STRING%’). When the time came for me to use a column name instead since all string values to search for is in a table in my database, I tried to just replace the string value with the column name like this LIKE (%table.column_name%). The result was pretty obvious. It gave me an error.

As a string is required in this situation, I thought of trying the CONCAT() function since that outputs a string. And it worked! Hehehe. You can do it like this

1
LIKE CONCAT('%', table.column_name)

Found this post useful? Buy me a cup of coffee or help support the sponsors on the right.

Related Posts with Thumbnails