Is there a shortcode for login with facebood that can be used in a widget?

I am using the plugin Sidebar login Version 2.3.2 that creates a widget for handling the login/register/logged in info in my theme. This plugin is handy to allow me to present the user with a login/register tab and then some info / links post login.

What I would like to do is add a 'login with facebook' button to this widget, and then post login allow the sidebar functionality to present the information/graphics. Is there some short code that I could use in this widget to accomplish this?

cheers,

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    A shortcode for the widget would depend on the widget actually, as most widgets don't work with shortcodes.
    [wdfb_connect] - will create a Facebook Connect button with default text ("Log in with Facebook")
    [wdfb_connect]Get in![/wdfb_connect] - will create a a Facebook Connect button that says "Get in!".

    That's from the plugin's shortcode page. However, there's also a Facebook Connect widget that works as well. Just go to your widgets page and add it to the sidebar.

    Thanks!

  • DavidM
    • DEV MAN’s Mascot

    Hi sstremel and first off, welcome to WPMU DEV!

    Sure, you can use the following shortcode, as detailed in Ultimate Facebook > Shortcodes:
    [wdfb_connect]

    I'm not sure how you're planning to add it to that other plugin, but if you're looking to code it into that other plugin you could perhaps use the following:
    do_shortcode( '[wdfb_connect]' );

    And you could also try adding it to a text widget by first adding the following to your theme's functions.php file:
    add_filter('widget_text', 'do_shortcode');

    Hope that helps!

    -David

  • DavidM
    • DEV MAN’s Mascot

    Seems Mason got to this just as I was posting! As Mason mentioned, widgets don't normally use shortcodes but the adding that functionality to the text widget as I mentioned may just sort it for you.

    However, as Mason mentioned, really the easiest thing to do is use the widget that comes with the plugin.

    -David

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.