Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages »

HOWTO: add a facebook 'Like' button


 
Prev Previous Post   Next Post Next
  #1  
Old Jan 9, 2011, 03:37 AM
Tim F
 
66 posts · Jul 2009
HOWTO: add a facebook 'Like' button

Hey all,

I've got plenty of help here so wanted to give something back even if it's pretty small

The following code can be added anywhere you want, but I add it to style & edit center column. It displays a facebook like button on your page using the iframe version of the code, but with the benefit that the like button will add the 'like' to the current page url rather than a single url.

In english, you get one of the features of the more complex version of the facebook like button without having to sign up for an account and use their java sdk etc.

Here it is:

Code:
<?php $Path=$_SERVER['REQUEST_URI']; $URI='http://www.yoursite.com'.$Path; ?>
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo $URI; ?>&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>
You need to replace http://www.yoursite.com with your sites root url in exactly the same format.

Last edited by juggledad; Jan 9, 2011 at 03:47 AM.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i add the add to cart button to a post or page? dilago eCommerce & Atahualpa 7 Oct 31, 2011 09:37 AM
[SOLVED] Facebook Share button not sharing posts separately Karen Forum How-To 4 Dec 6, 2010 01:30 AM
Facebook share button doesn't display my pics ! drey Plugins & Atahualpa 2 May 9, 2010 01:45 PM


All times are GMT -6. The time now is 01:00 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.