empty spaces in widgets

I have a bunch of widgets in the product theme sidebar. Some use widget logic to work, others use Membership plugin membership widgets. I notice that if a widget doesn’t apply to the current user it does not display but still uses up space.

For example, in the admin panel, if I have 5 widgets for the sidebar and only the 5th one applies to a current user then site view shows as empty spaces for the first 4 widgets and the 5th widget appears after a lot of white space.

How do I get the first widget that is being used to render in first widget position? Ditto second widget being used in second position…

  • Mason
    • DEV MAN’s Sidekick

    Hiya Atlanta,

    If we could get a link to see this in action it’d be very helpful. My hunch is that while ceratain widget content is being hidden, the outer wrapper is not and thus creating the white space. A quick look at the page’s source code could confirm this.

    The only way to really get rid of this would be to remove any margin/padding associated with the widget wrappers. This will remove the white space but then probably mean that your widget content areas are too close (when/if you ever have more than one widget for a user).

    To counter-act this you should apply the padding/margins from the widget wrapper to the widget content itself.

    Hope this helps!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.