Snippet: Add facebook share link

Whatever type of website you develop, you would definitely need a Facebook Share button.

Add following snippet where you want to display the share link. It should be within the loop.

Snippet

<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>" target="blank">Share on Facebook</a>

Result

Share on Facebook

or

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>