We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

exclude line of code in the home page

exclude line of code in the home page

Etay56
Excursionist
31 0 5

I've put this code in my theme.liquid file:
body {
direction: rtl;
text-align: right;
}
and I want it to apply everywhere except in the home page, I would like very much if someone can help me with that
Thanks in advance

store link: https://7c8266-b4.myshopify.com/

Replies 4 (4)

AnneLuo
Shopify Partner
1381 240 281

You can try this code by following these steps:
Step 1: Go to the online store ->Theme ->Edit Code.
Step 2: Find the theme.liquid file and add the following code above the </head> tag

 

{% if template.name != 'index' %}
<style>
 body {
   direction: rtl;
   text-align: right;
 }
</style>
{% endif %}

 


Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!

If this is helpful, please Like and Accept the solution.
Want to modify or custom changes on store? Let me help.
- Feel free to Email Me   

Buy Me A Coffee

BSSCommerce-HDL
Shopify Partner
2305 835 907

Hi @Etay56, You can try with this code:

{% unless template == 'index' %}
 <style>
body {
  direction: rtl;
  text-align: right;
}
 </style>
{% endunless %}

Hope this can help you 

Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges:
Get more sales with striking labels, badges, and banners from our 10,000+ available templates.

BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

PageFly-Noah
Shopify Partner
1317 233 282

This is Noah from PageFly - Shopify Page Builder App

 

Hi @Etay56  Please add code here to fix it:

Step 1: Online Stores > Themes > Edit code

Step 2: Choose file theme.liquid
Step 3: Add code above the tag </head>

 

{% unless template contains 'index' %}
<style>
body {
direction: rtl;
text-align: right;
}
</style>
{% endunless %}

 

Hope my solution will help you resolve the issue.

 

Best regards,

Noah | PageFly

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


PageFly - #1 Page Builder for Shopify merchants.


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

Etay56
Excursionist
31 0 5

Thats great but the problem is that when I move to another page in my site the header icons flips and everything rearranges in the header, maybe we can exclude this from the header fully as well?