Remove Search Bar On Mobile Version, Sense Theme

Solved

Remove Search Bar On Mobile Version, Sense Theme

bebop87
Tourist
13 0 6

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

Accepted Solution (1)
Made4uo-Ribe
Shopify Partner
8446 2018 2478

This is an accepted solution.

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

 

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

 

And Save. 

Please dont forget to refresh always. Thanks!

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.

View solution in original post

Replies 15 (15)

Made4uo-Ribe
Shopify Partner
8446 2018 2478

Hi @bebop87 

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

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
bebop87
Tourist
13 0 6

powerfoampro.com

Made4uo-Ribe
Shopify Partner
8446 2018 2478

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; }
}

 

  • And Save.
  • Result:
  • Made4uoRibe_0-1699218661205.png

     

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!

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
bebop87
Tourist
13 0 6

Capture.PNG

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

Made4uo-Ribe
Shopify Partner
8446 2018 2478

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!

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
bebop87
Tourist
13 0 6

I replaced old code with new solution code to no avail 😕 could there be something else I'm doing wrong?

Made4uo-Ribe
Shopify Partner
8446 2018 2478

This is an accepted solution.

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

 

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

 

And Save. 

Please dont forget to refresh always. Thanks!

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
bebop87
Tourist
13 0 6

Beautiful, thank you

Made4uo-Ribe
Shopify Partner
8446 2018 2478

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

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.

PageFly-Richard
Shopify Partner
4668 1069 1727

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

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.

kljlaielk
Shopify Partner
4 0 0

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

Made4uo-Ribe
Shopify Partner
8446 2018 2478

Hi @kljlaielk 

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

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
kljlaielk
Shopify Partner
4 0 0
Made4uo-Ribe
Shopify Partner
8446 2018 2478

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:

Made4uoRibe_0-1728244945029.png

 

 

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

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
kljlaielk
Shopify Partner
4 0 0

Excellent - thank you very much!!