How can I show login to people not logged in.

edited October 2016 in WordPress
Hi! I am using the code in the developer section to hide content on some pages from people that are not logged in. I'd like to show the social login to those that are not logged in, so they can log in right there and see the content. I tried using the short code, but it actually DISPLAYS the short code on the page, rather than the social login. For now, I am having to redirect to the log in page, but I'd love any help.

Answers

  • Claude_SchlesserClaude_SchlesserAdministratorOneAll Team
    Hi Stephanie,

    the short-code only works in posts.
    To embed Social Login directly in the code of a page you need to use this code:

    <?php do_action('oa_social_login'); ?>
  • It does not work either. Here's a link: http://hauntedjourneys.com/frontierpacific/
    If you log in, you can see the content (we used your code to determine if they are logged in or not), and if you are not logged in you see the message to log in, and I have the code you mention above below the link to log in, and it does not show.
  • Claude_SchlesserClaude_SchlesserAdministratorOneAll Team
    edited October 2016
    Hi Stephanie,

    when I look at the sourcecode of your page then I see this:
    <!--?php do_action('oa_social_login'); ?-->

    The code has somehow been escaped and this is the reason why it's not working correctly.

    The code must look like this:
    <?php do_action('oa_social_login'); ?>

    Are you using a WYSIWYG editor?
    Please try to edit the RAW contents if possible.

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.