Home / posts / Facebook like button
  • How to Facebook like button


    Adding this snippet to your wordpress loop within the index.php template file or single.php will add a Facebook like button for each article you post with the associated permalink.

    ( click code to copy )

    wordpress snippet : PHP

    <iframe src="http://www.facebook.com/plugins/like.php?href=<?php the_permalink() ?>&amp;layout=standard&amp;show_faces=true&amp;width=80&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:80px;" allowTransparency="true"></iframe>

    ( WordPress codex functions, hooks, in this snippet. )