Different margin in policy page

Solved

Different margin in policy page

manbru
Pathfinder
112 0 31

Hey,

 

I've used this code before the give the breadcrumbs different margins on different pages in my strore, and it works great:

{% if template.name == 'product' %}
<style>
  @media (min-width: 769px) {
    .breadcrumbs {
      margin-left: 70px;
    }
  }
</style>
{% endif %}

 

However I want to do the same thing for the policy page but haven't been able to find the right "Id" for it.

I want the same margin on the policy page that the product page has.

 

The page: https://r1vex.myshopify.com/pages/test 

 

Skärmavbild 2024-09-28 kl. 12.48.58.png

 

Thanks for helping

Accepted Solution (1)

Moeed
Shopify Partner
5323 1437 1723

This is an accepted solution.

Hey @manbru 

 

Add this code right below the code you have added

{% if template.name == 'page' %}
<style>
  @media (min-width: 769px) {
    .breadcrumbs {
      margin-left: 70px;
    }
  }
</style>
{% endif %}

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Custom Design | Advanced Coding | Store Modifications


View solution in original post

Replies 2 (2)

Moeed
Shopify Partner
5323 1437 1723

This is an accepted solution.

Hey @manbru 

 

Add this code right below the code you have added

{% if template.name == 'page' %}
<style>
  @media (min-width: 769px) {
    .breadcrumbs {
      margin-left: 70px;
    }
  }
</style>
{% endif %}

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Custom Design | Advanced Coding | Store Modifications


Sangeetanahar
Explorer
541 36 69

hello @manbru 

o apply the same margin to the breadcrumbs on the policy page, you can use the following code. The template name for policy pages in Shopify is typically 'page', and you can check for the specific handle to target the policy page:

 

{% if template.name == 'product' or template.name == 'page' and page.handle == 'policy' %}
<style>
  @media (min-width: 769px) {
    .breadcrumbs {
      margin-left: 70px;
    }
  }
</style>
{% endif %}

 

If this was helpful, hit the like button and accept the solution.
Thanks

Was I helpful?

Buy me a coffee



Want to modify or custom changes or bug fix on store . Or Need help with your store? Or -Want Complete Storefront
Email me -sangeetarahuldhiman@gmail.com - Skype: live:sangeetarahuldhiman -Whatsapp: +917009811712
Checkout Some Free Sections Here