WordPress.org

Ready to get started?Download WordPress

Forums

Social Login & Social Sharing by Janrain
Only using the widget at comments when not lo (2 posts)

  1. BramVanroy
    Member
    Posted 2 years ago #

    Is it possible to only include the widget (the one that tells you "Welcome <username>" when logged in or "To comment, click below ...") only when the user is NOT logged in yet?

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

  2. juanm_janrain
    Member
    Posted 1 year ago #

    I don't think that can be done via the widget, but you can do it via short code.

    Change all your settings in the Dashboard so that the social login link isn't visible on the page. Remove the Sign-In widget from your toolbars and select "None" in Login links for comments.

    Then, put the following code in your .php files where you want the sign-in widget to appear (so, header.php, comments.php, etc). Note the use of the [rpxnotuser][/rpxnotuser] short code... this means that the rpxlogin experience will only appear when the user is not logged in to the site.

    <?php
    echo do_shortcode('[rpxnotuser][rpxlogin prompt="Log in with your favorite identity provider" style="large" autohide="false" datamode="false"][/rpxnotuser]');
    ?>

    Hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.