How to add Facebook like button WordPress

Use the Facebook API and create your own Like button for your WordPress site

Customize your own

Please notice we need to use a WordPress function to get the post URL:

<?php echo urlencode(get_permalink($post->ID)); ?>


<iframe src="//<?php echo urlencode(get_permalink($post->ID)); ?>&layout=button_count&show_faces=false&width=450&action=like&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>

Leave a Reply

Add <code> Some Code </code> by using this tags.