• Resolved aberniz

    (@aberniz)


    Hi, I’ve got 2 optin widgets that I want to hide once the user has logged in.

    For the first opting widget (a sidebar one) I just added this code: !is_user_logged_in(). It works OK.

    My second optin code was inside my single.php. So, what I did was to install Widget Shorcode, and moved the code it into a widget. Then I placed the shortcode into my single.php. It is working OK: https://projectmanagers.org/project-team-charter-cross-cultural/. I did this for being able to hide it with your plugin. The problem, is that when I add the !is_user_logged_in() code in your widget, it doesn’t hide this widget for logged in users.

    I can give you access, if you want to check it.

Viewing 1 replies (of 1 total)
  • Thread Starter aberniz

    (@aberniz)

    I solved it with code in my single.php:

    <?php if ( !is_user_logged_in() ) {
    echo do_shortcode(‘[widget id=”text-html-widget-32″]’);
    } ?>

Viewing 1 replies (of 1 total)
  • The topic ‘It doesn't work with Widget Shortcode plugin’ is closed to new replies.