How can i remove widgets on moible view

  • Unknown's avatar

    Hi,

    I’m struggling to remove the sidebar widgets on mobile view. When on a phone all the sidebar widgets are moved to the bottom and it makes scrolling a nightmare.

    Can anyone help.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi pkboppana

    If you have WordPress.com Premium or WordPress.com Business you can edit the CSS of your blog, it’s all explained under Editing CSS

    To hide the sidebar, go to Appearance > Customize > CSS, delete all the informational text in that window, and paste in the following custom CSS.

    media="all"
    @media only screen and (max-width: 767px)
    .container.sp_sidebar #sidebar {
     display: none;
    }

    This will hide the whole sidebar. You could target specific widgets if desired, if you would prefer to hide specific widget, let me know and I can assist you further.

    If you don’t have the ability to edit CSS we will need to see whether we can do this via your theme. What theme are you using?

  • Unknown's avatar

    Thankyou for getting back .

    I’ve tried the code above and it seems to have not done anything.
    I’m using Hemlock theme – which is built for wordpress.

  • Unknown's avatar

    Sorry, my mistake try

    @media only screen and (max-width: 767px)
    .container.sp_sidebar #sidebar {
     display: none;
    }

    Have you turned Include Custom CSS in the Mobile Theme on?

  • Unknown's avatar

    Sorry for the confusion, WordPress is removing
    display: none from the text window when you save it because of the first line of the code, ignore the first line of the code. Just enter

    .container.sp_sidebar #sidebar {
     display: none;
    }

    This should work now!

  • Unknown's avatar

    Sorry, I’d missed a curly bracket in the first attempt this will definitely work now, try

    @media only screen and (max-width: 767px) {
    	.container.sp_sidebar #sidebar {
    		display: none;
    	}
    }

    I’ve just tried this and it works!

  • Unknown's avatar

    The last piece worked like a charm!!

    Thanks a Million :D

  • Unknown's avatar

    Sorry for all the confusion, we got there in the end!

  • The topic ‘How can i remove widgets on moible view’ is closed to new replies.