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
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
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
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!
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!!