Support » Plugin: Display Widgets » Show only for Logged-out/in users can't be disabled

  • Can you please ASAP update plugin and replace this code (line 267-270):

            $instance['dw_logout'] =  $new_instance['dw_logout'];
            $instance['dw_login'] = $new_instance['dw_login'];

    with this code:

    $instance['dw_logout'] = $new_instance['dw_logout'] ? 1 : 0;
        $instance['dw_login'] = $new_instance['dw_login'] ? 1 : 0;

    so when you enable any of both options, you can also disable it later. With current code you can only enable, but not disable this options.


Viewing 9 replies - 1 through 9 (of 9 total)
  • I can confirm this issue as well. Show only for Logged-in/out users checkbox cannot be cleared once selected.

    Thinking about it, those two options should be radio buttons not checkboxes, right?

    No, radio buttons are optional (1st or 2nd), and can not be disabled (none of both).

    Checkboxes can be toggled.

    The bes option is dropdown list with 3 options (none, logged-in, logged-out).

    IMHO 🙂

    I am having the same problems with this widget.
    the replacement of the code does not work for me 🙁


    Thank you SO much for posting the replacement code. It worked great on my site.

    It would be awesome if this issue could be resolved within the plugin. I love Display Widgets, but not being able to disable these options once they’ve been enabled can be quite troublesome.

    Unticking the box and saving the widget just causes the checkbox to become checked again at the moment.

    Replacement code works good!

    But I don’t see the widget when I tick ‘Show only for logged in user’ and when I am logged in.

    Anyone knows what the problem is?

    Plugin Contributor Steph Wells


    This has been updated in v2.0. This option is a dropdown instead of check boxes now.

    It works! Brilliant!

    But after updating the plugin almost all the widgets where on default ‘Logged-in users’, so I needed to change that first.

    Maybe you can make ‘Everyone’ as default…

    Correction: I only had this on one site, the site where I changed the code like explained above so I don’t think it is a problem for the normal plugin user.

    Plugin Contributor Steph Wells


    Can you try 2.01 and let us know if you still have trouble? It was defaulting to logged in for existing widgets.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Show only for Logged-out/in users can't be disabled’ is closed to new replies.