WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: FaceBook Like Button Plugin for WordPress] Manual insert to theme (17 posts)

  1. Tom
    Member
    Posted 4 years ago #

    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.

    http://wordpress.org/extend/plugins/fblikebutton/

  2. healyourchurchwebsite
    Member
    Posted 4 years ago #

    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!

    Dean

  3. Tom
    Member
    Posted 4 years ago #

    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

  4. healyourchurchwebsite
    Member
    Posted 4 years ago #

    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.

    Dean

  5. MonochromeNight
    Member
    Posted 4 years ago #

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

    Works for me.

  6. SidianMSJones
    Member
    Posted 4 years ago #

    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.

  7. SidianMSJones
    Member
    Posted 4 years ago #

    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.

  8. Tom
    Member
    Posted 4 years ago #

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

  9. polkadotcreations
    Member
    Posted 4 years ago #

    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!]

  10. polkadotcreations
    Member
    Posted 4 years ago #

    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.

  11. zestylemon
    Member
    Posted 3 years ago #

    <?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!

  12. Tom
    Member
    Posted 3 years ago #

    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?

  13. Tom
    Member
    Posted 3 years ago #

    Sorry, I meant "single.php", not "page.php"- I only want it to show on posts. :)

  14. Tom
    Member
    Posted 3 years ago #

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

  15. DanMichel
    Member
    Posted 3 years ago #

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

  16. djdevy
    Member
    Posted 3 years ago #

    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

  17. dbirlew
    Member
    Posted 3 years ago #

    @djdevy: Your code worked great for me!!! However, I wanted to switch from light to dark and show_faces=false to true, and had some problems customizing. Referring to the Facebook reference site, I realized that the source code actually uses the code &_amp; (without the underscore) instead of actual ampersands. It looks like this forum is auto-parsing ampersands for the ASCII code (or whatever that code is). So if anyone is having trouble using djdevy's code replace every ampersand with &_amp; minus the underscore.

    Once I changed the ampersands out, I was able to change light to dark and show_faces=false to true.

    Also note that if you're going to change show_faces to true, you should change the height from 24px to about 60px.

Topic Closed

This topic has been closed to new replies.

About this Topic