B2B Articles
June 19, 2010
By:Ironpaper

How To PHP To Create A Facebook Like Button For A Dynamic Wordpress Post Page URL

The Facebook Like Button is a very useful and rapidly popular social web marketing tool that can be applied to websites and webpages. By default, the Facebook's Like Button form will recommend a specific web page that is hard coded into the code snippet (which can be generated by Facebook's Like Button form).

Typepad users now have the Facebook Like Button embedded as a core application, which has helped to generate a lot of traffic to blog websites based on a recent report by Typepad.

It is possible to publish a Facebook Like Button that references a dynamic Wordpress Post page rather than just making recommendations to the website in general.

How to reference the URL for a single Wordpress post

On the Wordpress post page template, below the snippet:

<div <?php post_class() ?> id="post-<?php the_ID(); ?>">, you can print the page URL with the following code: &lt;?php the_permalink(); ?&gt;

The above code snippet, will print the URL of that post page. 

Interested in working for or partnering with Ironpaper? We’d love to hear from you.
We are passionate about helping remarkable companies grow. We solve challenges that hold businesses back. We love it. 
Connect with Us