Support » Plugins and Hacks » [Plugin: FaceBook Like Button Plugin for WordPress] Manual insert to theme

[Plugin: FaceBook Like Button Plugin for WordPress] Manual insert to theme

  • Tom


    Is it possible to turn off auto-insert, and if so- what code do I need to manually add to my theme where I’d like the button positioned?

    I’ve noticed there’s quite a few versions of this ‘FB like button’ by various authors, but this one seems a little better as it gives more options for CSS styling.. however the custom positioning is a must for me.

    Help appreciated.


Viewing 15 replies - 1 through 15 (of 16 total)
  • Hi jeffreeeeey,

    What is it they say about great minds?

    I’ve already been toying with the idea of adding a ‘content tag’ feature that would allow individuals to place the like button anywhere they want in a post and/or page.

    It’s not that hard, just adds an additional learning curve and complexity for users.

    That said, sounds like we’re on the same page. I appreciate the feedback as it helps me determine on how to rank the various feature ideas under consideration.

    Thanks for pitching in!




    Yep, they think alike 🙂

    Here’s the site I want to use it on: http://bit.ly/d8FoWq

    If you look how it is at the moment, you’ll see that it’s out of place.

    All I want (Ideally) is a text link saying ‘like’ (Just like on facebook) right next to ‘comment’ (On the same line).

    I’ve tried various different plugins, including the ever-so confusing GD star rating, but no matter what, I just cannot get it to look/ work how I need it to.

    With the ability to turn off auto-insert, it will (I hope) at least allow me to position it correctly 🙂

    Thanks, and I’ll look forward to future updates

    Hi jeffreeeeey,

    I think I create a context tag no problemo, but keep in mind that the like button is delivered via an iFrame from FB …

    … meaning, while I like your idea for a “like” hyperlink, the rendering comes by way of FB directly, so I’m not sure I’d be able to control that aspect of the feature.




    <?php echo fblike_get_iframe(get_permalink($post->ID)) ?>

    Works for me.

    I’m really wanting to do this as well, although I don’t want to turn off the auto versions of it.

    MonochromeNight, thank you I’ll try this right now.

    Hey this is doing exactly what I need! Awesome.
    I need a little help getting the styling right though.

    Here is my link: http://www.mymythos.org/category/1-mythos-magazine/

    I see that Monochrome’s code is echoing the FBlike plugin, so it’s probably taking the styling from there, but is there some way I can give this echo its own style? Basically I just need to to only be the like button, no friend’s names by it, no faces….unless I can get them to stay within the black container they are currently going out of.



    OK Thanks for the reply healyourchurchwebsite.. I shall wait & see what comes from later updates from you. 🙂

    Lisa Clarke


    Add me to the list. I would very much like the ability to put the like button in a specific location. Thanks!

    [edited to add – Monochromenight, I tried your solution and it didn’t work at first, until I realized I needed to edit the size of the widget in the admin area – now it’s perfect. Thank you!]

    Lisa Clarke


    SidianMSJones, have you tried editing the widget size in the admin settings? I believe if you make the size of the widget correspond to the size of the like button itself, all of the rest of the information won’t be visible.

    <?php echo fblike_get_iframe(get_permalink($post->ID)) ?>
    Works for me as well. Please can you look at adding this piece of info to the admin screen of the plugin – easy for me & others to find should we need this info again in the future.

    Thanks for a great plugin!



    Thanks guys, sorry it’s been a while, I have been busy with other things of late.

    OK, So I now know that it’s not possible to just have a ‘like’ hyperlink without the facebook styling- OK, I can live with that.

    So, trying to add the button into the correct position in my template now… I have tried the code given below:

    <?php echo fblike_get_iframe(get_permalink($post->ID)) ?>

    …to my page.php template, right after the “comment” section, although it doesn’t seem to be working properly for some reason.

    Only way I can get the like button to work is by auto-insert via the settings page for the plugin. However, the ‘like’ button likes the site index (homepage), meaning the same people, & number of people have liked every single post on the site.

    Any ideas what the problem may be?



    Sorry, I meant “single.php”, not “page.php”- I only want it to show on posts. 🙂



    Sorry to have to bump this thread, but is anyone able to help before I try a different ‘like’ plugin?

    same. i need if for singlepost.php and i want it to be a like button count

    ok..I’m not sure if this is what are you looking for, but it worked for me. It adds a like button in each post separately. I just inserted this in my single.php:

    <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=standard&show_faces=false&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:24px" align="middle"></iframe>

    I hope it helps. Cheers

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Plugin: FaceBook Like Button Plugin for WordPress] Manual insert to theme’ is closed to new replies.
Skip to toolbar