Disable wordpress widgets on mobile (3 posts)

  1. nhuzaa
    Posted 3 years ago #

    I need to disable all the widget of my theme while site is loaded on Mobile. I try using CSS media queries for this but its not quite effective.

    I am responsive theme on my site . Yes the widgets resize and arrange themselves quite well but I don't thing the content on the widgets will be useful to the mobile view. What should I do ?

  2. WPyogi
    Forum Moderator
    Posted 3 years ago #

  3. CPC Mike
    Posted 3 years ago #

    Without more information or a site link it's difficult to give you specific advise but basically you will need to disable the widgets within your existing media queries. You will also need to adjust the main content width as well for those views.

    To make it even simpler you could assign a class to all your sidebar widgets then hide them using the appropriate media queries.


    So you would have something like this:

    .my-sidebar-widgets {

    Alternately, you could hide the entire sidebar but the above will allow you to display certain widgets if desired.

Topic Closed

This topic has been closed to new replies.

About this Topic