Officially you can apply settings for a like box for facebook from this link – https://developers.facebook.com/docs/reference/plugins/like-box/ – download the code and set it up on your site. the above link works if you have one URL that you want to use the box with.
but what if in WordPress we want to add the likebox to all pages and posts dynamically without specifically adding a plugin and then modifying it to show at a particular place in the post.
we have an easy solution. Here wordpress template tags come to work. you can download the code snippet from the facebook website and alter it. then you can put it in your WordPress template single.php and/or page.php for facebook like box to show with dynamic URL.
here is the code. please copy/paste the below code in your single.php file of your current theme under the post and the individual button will be added.
<iframe style=”border: none; overflow: hidden; width: 450px; height: 30px;” src=”http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=standard&show_faces=false&width=450&action=like&colorscheme=light” frameborder=”0″ scrolling=”no” width=”320″ height=”240″></iframe>