Remove Search Bar On Mobile Version, Sense Theme

Topic summary

A user seeks to remove the search bar from the mobile version of their Shopify store using the Sense theme. They successfully hid it on desktop but need a mobile-specific solution.

Initial attempts:

  • Desktop CSS code worked but mobile version remained unchanged
  • Adding code to base.css file produced no results

Working solutions provided:

  1. CSS approach - Add to base.css or theme.css:
@media only screen and (max-width: 989px){
  .header__icon--search { display: none !important; }
}
  1. Alternative method - When CSS fails, paste code in theme.liquid file before the </body> tag wrapped in <style> tags

Key troubleshooting notes:

  • The !important flag may be necessary
  • Screen width breakpoint (989px or 767px) may need adjustment
  • If base.css doesn’t work, the theme.liquid method serves as a reliable fallback
  • Always save changes and refresh the page

Resolution: Original poster confirmed success. A second user with similar issue also resolved it using the provided CSS targeting .menu-drawer__menu-item.menu-drawer__search-parent.

Summarized with AI on November 5. AI used: claude-sonnet-4-5-20250929.

I’m trying to find a code to remove the search bar from the header on my sense theme, so far I’ve used the below code for my web version but i can’t find a version for it to remove it from the mobile version

.header__icon–search { display: none; }

url:

powerfoampro.com

1 Like

Hi @bebop87

Would you mind to share your Store URL website? with password if its unpublish. Thanks!

1 Like

powerfoampro.com

1 Like

Thanks! Try this one.

  • From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  • Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  • In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
@media only screen and (max-width: 989px){
.header__icon--search { display: none; }
}

I used your code. But i just check what screen size need to pull out the icon.

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

1 Like

I copied code to bottom of base.css but still no results ;(

1 Like

Oh, Can you replace with this one.

@media only screen and (max-width: 989px){
.header__icon--search { display: none !important; }
}

And Save.

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

1 Like

I replaced old code with new solution code to no avail :confused: could there be something else I’m doing wrong?

1 Like

Im not sure why was that, would you mind to paste it on the theme.liquid open the file and find the tag and paste the code below before this tag.


And Save.

Please dont forget to refresh always. Thanks!

1 Like

Beautiful, thank you

1 Like

Seems like there is something wrong with your base.css.

1 Like

Hi @bebop87

This is Richard from PageFly - Shopify Page Builder App, I’d like to suggest this idea:
Online Store ->Theme ->Edit code
Assets ->Base.css

@media only screen and (max-width: 767px){
 .header__icon--search { 
   display: none !important; 
 }
}

Hope you find my answer helpful!
Best regards,
Richard | PageFly

Hello. I am trying to do the same but it is not working for me either - can you help?

Hi @kljlaielk

Would you mind share your store URL? Or you can pm me. Thanks!

Thank you - https://shopbettylin.com/

Thanks for the info, check this one.

From you Admin page, go to Online Store > Themes

Select the theme you want to edit

Under the Asset folder, open the main.css(base.css, style.css or theme.css)

Then place the code below at the very bottom of the file.

li.drawer-menu__item.drawer-menu__search-parent {
    display: none;
}

And Save.

Result:

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

1 Like

Excellent - thank you very much!!