headerIMG

B2B Articles - June 19, 2010

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. 

Tel 212-993-7809  

Ironpaper ®
10 East 33rd Street 
6th Floor
New York, NY 10016
Map

Ironpaper - B2B Agency

B2B Marketing and Growth Agency.

Grow your B2B business boldly. Ironpaper is a B2B marketing agency. We build growth engines for marketing and sales success. We drive demand generation campaigns, ABM programs, B2B content, sales enablement, qualified leads, and B2B marketing efforts. 

Ironpaper Twitter Ironpaper Linkedin