{"id":5686,"date":"2023-06-09T10:56:40","date_gmt":"2023-06-09T10:56:40","guid":{"rendered":"https:\/\/forest-1041a2.ingress-bonde.ewp.live\/how-to-remove-hellobar-on-mobile-devices-on-wordpress-using-css\/"},"modified":"2023-06-09T10:56:40","modified_gmt":"2023-06-09T10:56:40","slug":"how-to-remove-hellobar-on-mobile-devices-on-wordpress-using-css","status":"publish","type":"post","link":"http:\/\/benrmatthews.local\/how-to-remove-hellobar-on-mobile-devices-on-wordpress-using-css\/","title":{"rendered":"How to remove HelloBar on mobile devices on WordPress using CSS"},"content":{"rendered":"

Hello Bar is a popular WordPress\u00a0plugin that inserts a highly visible notification\u00a0bar at the top of your website or blog. Combined with a clear call-to-action button or sign up form, it’s a very effective way to direct people to a certain page on your site or get sign ups for your email newsletter.<\/p>\n

The Hello Bar is visible on mobile devices as a default, which means it takes up a lot of screen space on smaller mobile phones, such as the iPhone. It would be great if there was a way to remove the bar on smaller devices, but the HelloBar plugin doesn’t make this possible from its settings page.<\/p>\n

Here’s how you can remove the Hello Bar when people visit your site from mobiles, but keeps it visible when viewed on desktops, laptops or larger tablets devices.<\/p>\n

1. Go to Appearance >> Edit CSS<\/strong><\/p>\n

2. Copy and paste the following code:\u00a0<\/strong><\/p>\n

\/* Remove hellobar on mobiles ————————————— *\/<\/p>\n

@media only screen and (max-width: 700px) {
\n#hellobar_container,
\n#hellobar_pusher { display: none !important; }
\n}<\/p><\/blockquote>\n

3. Click the save button<\/strong><\/p>\n

That’s all there is to it!If that doesn’t work, open up your style.css file (available in Appearance >> Editor) and paste the same code into the bottom of the file, before the final ‘}’.<\/p>\n

Now, when you visit your site from a mobile device (or resize your screen to emulate a responsive layout) the HelloBar should disappear.