WordPress.org

Forums

Simple Facebook Connect
[resolved] SFC - Like Button - why 450px wide and wrapped in P tag? (6 posts)

  1. Mike Walsh
    Member
    Posted 3 years ago #

    I am successfully using the SFC collection of plugins and want to inc;ude the SFC - Like Button as part of my posts. Unlike the STC - Twitter Button, the SFC - Like Button is wrapped in a Paragraph tag - wouldn't it make more sense to wrap it in a DIV tag? I am also wondering why it defaults to 450px wide and there doesn't seem to be any way to change it. Is that on purpose?

    Thanks,

    Mike

  2. Samuel Wood (Otto)
    WordPress.org Tech Guy
    Plugin Author

    Posted 3 years ago #

    If you are manually adding it to the theme, you can change the width by specifying a width in the argument array. It defaults to 450 because FB defaults to 450. No other reason.

    And the P tag is there to make it easy for styling. If you'll notice, it has a handy fb-like class for styling it to be inline instead of block, or not depending on what you want. It's a P instead of a div because it's going into the content. The trunk version of the plugin lacks any form of wrapper, since it's not using the iframe anymore.

  3. neononcon
    Member
    Posted 3 years ago #

    Can you please explain how exactly to reduce this width?

  4. Mike Walsh
    Member
    Posted 3 years ago #

    I did it like this:

    //  Facebook Like Button?
        if (function_exists('sfc_like_button'))
        {
            echo '<span class="mshsbc-social-media-facebook">' ;
            $lb = sfc_like_button(array('width' => '300', 'height' => '25')) ;
            echo $lb ;
            echo '</span>' ;
        }

    It looks like the plugin has been updated in the last day or two so this may no longer be necessary as I am not seeing the plethora of SFC plugins listed in my dashboard any more and this code no longer works.

  5. Samuel Wood (Otto)
    WordPress.org Tech Guy
    Plugin Author

    Posted 3 years ago #

    That code will still work. Go to the SFC Settings page and turn on the like button.

  6. Mike Walsh
    Member
    Posted 3 years ago #

    Ok, I see why I am not seeing the SFC plugins in my Dev area, I don't have SFC configured. I just updated the production site and it works as expected.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic