Home>Support>Media queries in sidebar widgets

Media queries in sidebar widgets

Hi, I am trying to use the attributes CSS Styles to hide/show elements in the sidebar.
I got it working once and now I can’t figure out what syntax to use…

If i go via the custom css, I can hide the content in the widgets, but they still appear outlined above the content…
The theme has been modified somewhat, I have linked to dev site below.

My objective is to hide all sidebarelements on mobile devices and showing them below the content instead.

Hope you can help.

URL: http://beo.guldgrisen.dk/sneaky

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 5 months ago Daniel
    Hi, I Work Here

    Hi Pål Heick

    You can remove this with some custom CSS. If you navigate to Appearance > Custom CSS, you’ll get our custom CSS editor. Just add the following code.

    @media (max-width: 780px){
    #pgc-5-0-0 {
        display:none !important;
    }
    }
    

    The above will remove the sidebar elements on mobile devices. However if you wish to have it below the content, you could try switch the way you have organized your layout. Try put the sidebar to the right and let me know the outcome.

    Cheers

  2. 9 years, 5 months ago Pål Heick

    Yes, but that will remove the entire sidebar – I was hoping to be able to control each individual widget, as I wanted the top widget to go above the content, and the rest of the widgets to go below the content.

    I sort of solved the issue by moving the lower widgets to a page builder widget below the content loop and then keeping the desired widget in the sidebar.

  3. 9 years, 5 months ago Andrew Misplon
    Hi, I Work Here

    Hi Pål

    We can hide or show widgets based on the screen width in use. Moving their locations is possible but it’s a bit tricker. You could perhaps duplicate the widgets. That would allow you to hide one and show the other below a certain breakpoint.

    Have you perhaps changed it a little, I only see one sidebar widget:
    http://beo.guldgrisen.dk/

    Let me know and I’ll try help out from here.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More