How do I remove header border from home page only?

Solved

How do I remove header border from home page only?

kbtyau
Tourist
6 0 1

Hi, 

 

Just wanting to know how to remove the bottom border of my header on my home page only, i'd like it on all other pages - please let me know if there is other information I need to provide 

 

my store is: https://www.kbty.com.au/ 

password: teethu 

 

Thanks in advance! Screenshot 2024-11-06 at 9.47.11 PM.png

Accepted Solution (1)

DaisyVo
Shopify Partner
4460 499 596

This is an accepted solution.

Hi @kbtyau 

 

To complete your requests, please follow these steps:
 
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </head>
 
 

 

{% if template.name == "index" %}
{% style %}
header.theme__header.has-border::before {
    border: none !important;
}
{% endstyle %}
{% endif %}

 

 

Here is the result: https://prnt.sc/CvV4tIxP-gH7 

 

I hope this helps

 

Best,

 

Daisy

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution

View solution in original post

Replies 5 (5)

Huptech-Web
Shopify Partner
1169 234 265

Hello! @kbtyau Please follow these steps to add this CSS code:

1. Go to your Online Store
2. Click on "Themes"
3. Select "Edit code"
4. Open your CSS file. If you have a custom CSS file, open that instead.
5. If you can't find your custom CSS file, open "theme.css"
6. Add the following code at the end of the file.

 

body .toolbar.has-border:before, body .theme__header.has-border:before{
    display: none;
}

 

 

HuptechWeb_0-1730891799028.png

 

If you need further assistance, please let me know. If you found my help useful, consider liking this message and marking it as the Accepted Solution.
Best regards
K.K

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

EvinceDev
Shopify Partner
121 13 13

Hello @kbtyau , You need to add this class in body tag for homepage only so this will remove border on home page only

EvinceDev_0-1730891226918.png

.home .theme__header::before {
   display: none;
}

 

Shopify Theme Advanced Backend Developer and Debugger
Want to modify or develop new app, Hire us.
If our Answer is helpful then please Like and Accept Solution!
I am an eCommerce and Marketing Technology consultant based in India.
To inquire about consulting work availability, You can reach me on Skype by live: rahul.evince or mail on partners@evincedev.com.
Shopify Apps URL :- https://apps.shopify.com/partners/gemfind1
Customization on Shopify Theme | Shopify App Development | SEO & Digital Marketing

Made4uo-Ribe
Shopify Partner
10211 2427 3082

Hi @kbtyau 

Try this one. 

  1. From your Shopify admin dashboard, click on "Online Store" and then "Themes"
  2. Find the theme that you want to edit and click on "Actions" and then "Edit code".
  3. In the "theme. Liquid" file. Find the </body> tag and paste the code below before the tag. 

 

{% if template.name == 'index' %}
<style>
.theme__header.has-border:before {
    border: none;
}
</style>
{% endif %}

 

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

     

 

Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better! 

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.

DaisyVo
Shopify Partner
4460 499 596

This is an accepted solution.

Hi @kbtyau 

 

To complete your requests, please follow these steps:
 
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </head>
 
 

 

{% if template.name == "index" %}
{% style %}
header.theme__header.has-border::before {
    border: none !important;
}
{% endstyle %}
{% endif %}

 

 

Here is the result: https://prnt.sc/CvV4tIxP-gH7 

 

I hope this helps

 

Best,

 

Daisy

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
kbtyau
Tourist
6 0 1

Thank you so much!