• Resolved z3ff

    (@z3ff)


    Hi πŸ™‚ i created a ‘connect’ button in my WP with your plugin and added it to the header.php. Here’s button’s code i used:

    <div id="content-box">
    <a href="http://www.test.freedrip.com?loginFacebook=1&redirect=http://www.test.freedrip.com"><div class="new-fb-btn new-fb-1 new-fb-default-anim"><div class="new-fb-1-1"><div class="new-fb-1-1-1">Connect</div></div></div></a>

    It works. But how do i make it disappear\change, after user ‘connects’?

    http://wordpress.org/extend/plugins/nextend-facebook-connect/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Nextendweb

    (@nextendweb)

    You should use PHP code to verify if user logged in our not: is_user_logged_in

    <?php if ( !is_user_logged_in() ) { ?>
    <a href="http://www.test.freedrip.com?loginFacebook=1&redirect=http://www.test.freedrip.com"><div class="new-fb-btn new-fb-1 new-fb-default-anim"><div class="new-fb-1-1"><div class="new-fb-1-1-1">Connect</div></div></div></a>
    <?php } ?>

    Or if you would like to check if the current user has a linked Facebook account:

    <?php if ( !is_user_logged_in() || !new_fb_is_user_connected() ) { ?>
    <a href="http://www.test.freedrip.com?loginFacebook=1&redirect=http://www.test.freedrip.com"><div class="new-fb-btn new-fb-1 new-fb-default-anim"><div class="new-fb-1-1"><div class="new-fb-1-1-1">Connect</div></div></div></a>
    <?php } ?>
    Thread Starter z3ff

    (@z3ff)

    Thanks a lot, it works πŸ™‚
    i mean 1st code u gave me. About the 2nd – what exactly do u mean? if a user presses ‘connect'(echoed with 1st code), it’ll automatically offer him to log in, then, if he doesn’t have the related app in his FB, to allow it, etc…no?

    Plugin Author Nextendweb

    (@nextendweb)

    The second code is for the users who are not logged in or the logged in user doesn’t have linked account with Facebook to your site. This helps your old users to simply link their account with Facebook profile, which helps them to log in faster πŸ™‚

    Thread Starter z3ff

    (@z3ff)

    great, thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Connect button to disappear on success. How?’ is closed to new replies.