Hide WP Widgets on Mobile Devices
In this tutorial, we will learn that “How to Hide WP Widgets on Mobile Devices”? The mechanism for hiding a widget is similar to the hiding mechanism of the followings;- Hiding a div or span
- Hiding tables
- Hiding paragraph, headings, etc.




Code of hiding a WP Widget
Put the CSS code to hide any widget or any ID or class from mobile devices.
1 2 3 4 |
@media only screen and (max-width:480px) { #custom_html-37 { display: none !important;} } |
Some of the widget related useful plugins.
Here I am showing a list of some useful widget related WordPress plugins- Widget Options by By Phpbits Creative Studio
“Facilitate every widget an extra control field commonly knows as “Widget logic” and this is helpful for you to control the pages that the widget will appear on. The text field is available to help you to entertain with general PHP code or any WP’s Conditional Tags,”.
- Widget Context By Preseto
Widget Options adds elegant options on the bottom of each widget to completely control and manage each widgets appearance. Built with seamlessly integration with WordPress, this plugin is the world’s most favourite and complete widget management plugin solution yet.”
- “Assign different contents on your sidebars.
- Assign different contents on footer.
- Assign different contents on widgets.
- Widget Logic By Wpchefgadget, Alanft
“This plugin gives every widget an extra control field called “Widget logic” . Widget logic lets you control the pages that the widget will appear on. The text field helps you to use the followings;
- General PHP code
- WP’s Conditional Tags.”
Advantages of hiding a widget on mobile devices
There are many advantages of hiding a widget on mobile devices.- Some of the advantages are mentioned below.
- Some widgets do not contain very useful information that is necessary to show on the small size screen.
- Hiding a widget from the mobile screen can help to focus only on the content of the website that is actually required by the user.