Facebook Like Button for WordPress V3




[UPDATE 13/5/2010]

  • Multiple languages support (By: Anty (http://anty.at)).
  • Now you can change the font (By: Anty (http://anty.at)).
  • Code has been rewritten.
  • Database table removed, Replaced with options to avoid problems.

[UPDATE 8/5/2010]

  • og:site_name meta tag has been added to the header, So when somebody likes your post it’s going to appear on Facebook like this “User liked POSTNAME on SITENAME”.

Finally it’s here, V3… All features based on users requests :)


  • Shortcut added to show the button manually. [more info]
  • Live preview in the settings section.
  • Option to hide in the home, pages or posts.
  • Bugs fixed.

You can add the button to your template by adding these 2 functions:

For the normal button:

if (function_exists('Short_Button')){ echo Short_Button(); }

For Count button:

if (function_exists('Count_Button')){ echo Count_Button(); }


Admin Setting Section



You may also like

The Official Tweet Button Plugin for WordPress
Facebook Like Button V5.0 Major Update
Facebook Like Plugin for WordPress V2.5
WordPress Facebook Like Button Plugin V2

116 Responses

  1. avatar

    Hi Ahmed,
    Has anyone else mentioned that in the settings they get a blank screen?



    Ahmed Reply:

    i sent you email :)

  2. avatar

    I liked your developing very much, kindly see this site http://max99.ninja.pk

    There when those people who LIKE, their avatars are half shown. is that bug?


    Ahmed Reply:

    Hi Aaqil,

    No it’s not a bug just change the height, if it’s 40 make it more.. or if it’s nothing, make it 40 and test it.. :)

  3. avatar

    Hello, I’ve got a “Fatal error: Cannot redeclare class snoopy in /homez.167/websitename/www/wp-includes/class-snoopy.php on line 33” wen I’m opening the settings window on this plug.
    Am I alone ?

  4. avatar

    I also see the error:

    Fatal error: Cannot redeclare class snoopy in /usr/local/pem/vhosts/164488/webspace/httpdocs/wp-includes/class-snoopy.php on line 33

    The plug in works on the site, but I can’t access the plug in settings page in my dashboard…


  5. avatar

    I also have the same fatal error as LIZ and can’t access the settings…


    Ahmed Reply:

    @ Island Consulting

    This problem is caused by another plugin…

    @Scott, Liz, Manogr

    Sorry for being late, i had exams all the week… but i released update today,, it should solve the problem :)


  6. avatar

    Great Plugin!
    I had a question, when I ever someone pushes like on my website, cachesf.com, facebook does not post the title of the post. it just says bryan likes cachesf.com at cachesf.com

    how do i change this to show the title?

    thank you!

  7. Pingback : Kommentarsystem revolutioniert mit IntenseDebate und Facebook Like Button! | Buba weiß alles. Punkt!

  8. Pingback : Facebook ??????? « ????

  9. avatar

    Hey, thanks. The update fixed the settings problem. I noticed now that it’s very slow to load… wondering if that’s related? The site is http://nostupidanswers.com.

    Hope your exams went well :)


    Ahmed Reply:

    Hi Liz,

    I don’t thing it’s related, it works for me fast and with no lag… :)

  10. avatar

    One question: If you put it manually in the template as I do to avoid the duplication of the box? Thanks


    Ahmed Reply:

    @ Tony

    haha, i think i need to think about this :P..


    Done :)


    Can you provide screenshot ?


    I would like to keep it secret at this point :)


    What version of php do you have?

  11. avatar

    There is a bug in the code. The ‘Container Class’ doesn’t apply. You have to edit buttons.inc.php, after line 22 which is:
    ‘ht’ => ‘ht’, //Height Type px or em
    you must add
    ‘css’ => ‘css’, //Container Class name

  12. avatar

    Hi i just updated from the 3.6 version (that worked properly) to the 3.8 that gives me that bug when i try to acrivate plugin:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/mhd-01/website/htdocs/wp-content/plugins/facebook-like-button/inc/activation.php on line 5

  13. avatar

    Hello again, Ahmed :)

    You did two updates this last (2/3)days, and the first one solved my problem but the realy last update is giving me an other bug :s

    “Fatal error: Cannot redeclare class snoopy in /homez.167/gropix/www/wp-includes/class-snoopy.php on line 33”

    is it possible to have a link to download the v° juste befor please :s
    I did an otomaticupdate by mistak -_-‘…

    That would be great :)
    (ans sorry for my english, Im french^^)


    Ahmed Reply:

    mmm weired, i didn’t change the code or anything :S 😛

    You can download it from here: http://downloads.wordpress.org/plugin/facebook-like-button.3.6.zip :)

  14. avatar

    Whene Im setting to the setting tab :

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /homez.167/gropix/www/wp-content/plugins/facebook-like-button/inc/activation.php on line 5

    Realy sorry to be enoying :s


    Ahmed Reply:

    download 3.6 from the link in the last comment :)

  15. avatar


    How can I manually position the plugin in my theme ??
    I tried if (function_exists('Short_Button')){ echo Short_Button(); } but nothing happens…



    Ahmed Reply:


    If guess you un-checked show in post, pages and home… Which is right but i missed that when i was writing the code :S.. Sorry will fix it today or tomorrow :)

  16. avatar

    I installed this on my site and it works well, in terms of appearing below the post & functioning correctly, however the problem I am having is in the information it is sending to facebook. When a person clicks ‘like’ on a post, it simply posts my blog title & tagline to their wall, rather than the actual post title that they ‘liked’.
    Is there a way to ensure that the POST title is what is sent to facebook, NOT my blog name?


    Ahmed Reply:

    Will contact Facebook and see what i can do :)

  17. avatar

    I think there are a few bugs (I’m too new to php to be certain, so I say “think”) in 3.8

    First in buttons.inc.php ‘css’ is not included in the arrays for either Short_Button or Count_Button, but the code for both XFBML and iframe include:

    I’m not clear if ‘css’ was omitted because there were only to be used by people modifying their template (as I am) or if “‘ . $Value[‘css’] ‘” was accidentally copy/pasted into those functions.

    Second, using a div in $SDK makes it impossible to place the button inline with other elements, I’ve changed this to a span (actually I’ve changed all your divs to spans, but I don’t think all of them are necessary). Not so much a bug as a usability enhancement.

    Like I said up front I’m new to php hacking so I could be totally wrong… you clearly know WAY more then me so I apologize if I’m wrong on any of this.

    Thanks for the plug-in!


    Ahmed Reply:


    Actually you are right in everything, i thought i fixed the CSS thing :P… Will change the divs into spans next time.. And thanks for taking your time to write your feedback and suggestions… :)

  18. avatar

    Hi Ahmed,

    I’ve tried to use your 3.8 version of Like Button plugin. It shows me an error:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/virtual_web/xawieur.cz/public_html/www/wp-content/plugins/facebook-like-button/inc/activation.php on line 5


    Ahmed Reply:

    The problem is that you have PHP version 4 i guess, which soo old for the code. however you can install version 3.6 or 3.7 while i fix this problem :)

  19. Pingback : Meme: Mis plugins de Wordpress | Save The Geek

  20. avatar

    Help!!! Just updated to your latest, and the plugin cannot be activated:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /usr/local/pem/vhosts/164488/webspace/httpdocs/wp-content/plugins/facebook-like-button/inc/activation.php on line 5

  21. Pingback : Tweaks and more | Life in the City

  22. avatar

    Hi Ahmed, i installed the plugin and it is working fine but there is a huge white space underneath the like button… it appears when i move the button above and below the content. how do i fix this? i’m using wp 2.9.2 and php5.


    Ahmed Reply:

    hi Kira,

    Just change the height to 40px or as you like, until you get the best view :)

  23. Pingback : Add Facebook “Like” Buttons to Your WordPress Blog – WordPress Plugins | AdsenseBay

  24. Pingback : The Facebook Frenemy | Laura Keeley

  25. Pingback : How to See What People “Like” on Your Site with Facebook Insights | Angela Neal Media

  26. Pingback : Facebook Social Plugins & Their Impact on Your Website » The Molstad Consulting Blog

  27. Pingback : Added Facebook Like « Clay Cook