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


  #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.
  #2  
Old Jan 15, 2011, 02:29 AM
derekwbeck
 
151 posts · Nov 2010
Alternative View: you should set the url to either your home top-level domain (for all pages) or your facebook fan page if you have one. This way, you can collect fans in one place. If you have likes to each URL of your page, you are watering down your fan base. Some people will like one post, others will like another, and thus you'll have 5 unique likes for post A, 12 for post B, rather than 17 total for your site. My opinion: only like the site, not individual posts. Wordpress.org follows my approach: see their like count at the botton of any page on their site, and note the count is the same regardless of what page you look at on wordpress.org.

Derek Beck
http://www.1775thebook.com
  #3  
Old Jan 16, 2011, 06:51 AM
Tim F
 
66 posts · Jul 2009
I would rather people find my best pages than always land on my home page, but both approaches are valid I think
  #4  
Old Jan 21, 2011, 06:10 PM
Wyro
 
21 posts · Jul 2009
Tim, where do you insert that code? Thank you co much!

Steve Wyro
  #5  
Old Jan 29, 2011, 06:00 AM
Tim F
 
66 posts · Jul 2009
On my site, I put it under Style and edit center column>The Loop, just before the
Code:
<!-- / Post -->
tag. But the beauty of atahualpa is that there's lots of places you could use it!

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:51 AM.


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