Re: Hide or remove the Collection Title and Breadcrumb from a specific Collection Template

Solved

Hide or remove the Collection Title and Breadcrumb from a specific Collection Template

Adrian2021
Excursionist
13 0 6

Hi,

I have created a specific collection template in our Empire theme that will use a Metafield for its Title. I would therefore like to remove the standard Collection Title (and the breadcrumb), but just for collections using this template.

 

Thanks

 

Screenshot 2023-11-30 184225.jpg

 

Accepted Solution (1)
PageFly-Oliver
Shopify Partner
878 190 185

This is an accepted solution.

You can try

 

 

{% if template contains "brand" %}
<style>
 .breadcrumbs-container,
 .collection--title{display:none !important}
</style>
{% endif %}

 

 

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.

View solution in original post

Replies 10 (10)

Moeed
Shopify Partner
6591 1784 2167

Hey @Adrian2021 

 

Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


Adrian2021
Excursionist
13 0 6

Hi Mooed,

It is https://www.inspyerlighting.co.uk/

 

Thanks

 

Moeed
Shopify Partner
6591 1784 2167

Hey @Adrian2021 

 

I'm unable to locate that page, can you send me the exact link of that page?

 

Best Regards,

Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


Adrian2021
Excursionist
13 0 6

Ah, sorry, that's because it was in a draft theme. You can see it here in the live theme:

 

https://www.inspyerlighting.co.uk/collections/30-off-black-friday-2019

 

Moeed
Shopify Partner
6591 1784 2167

Hey @Adrian2021 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

{% for c in product.collections %}
{% if c.handle == "30-off-black-friday-2019" %}
<style>
nav.breadcrumbs-container {
    display: none;
}
h1.collection--title {
    display: none;
}
</style>
{% endif %}
{% endfor %}

RESULT:

Moeed_0-1701374296228.png

 

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

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


Adrian2021
Excursionist
13 0 6

Thanks Moeed, but I am retying to find a solution that can be applied to a specific template - i.e. I will have 60 collections using a specific collection template (Brand Template) and over 100 other collections using the Default collection template. I only want to hide the collection name and breadcrumb from the collections using the Brand Template. Is this possible at the template level? I don't really want to add the code above for 60 different collections. Thanks

PageFly-Oliver
Shopify Partner
878 190 185

Hi @Adrian2021 ,

 

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: Paste the below code at the bottom of the file -> Save

 

<style>
#shopify-section-template--17099095900376__main .breadcrumbs-container,
#shopify-section-template--17099095900376__main .collection--title{display:none}
</style>

 

 

Hope my solution works perfectly for you!

Best regards,

Oliver | 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.

Adrian2021
Excursionist
13 0 6

Thanks Oliver, but I am tying to find a solution that can be applied to a specific template - i.e. I will have 60 collections using a specific collection template (Brand Template) and over 100 other collections using the Default collection template. I only want to hide the collection name and breadcrumb from the collections using the Brand Template. Is this possible at the template level?

PageFly-Oliver
Shopify Partner
878 190 185

This is an accepted solution.

You can try

 

 

{% if template contains "brand" %}
<style>
 .breadcrumbs-container,
 .collection--title{display:none !important}
</style>
{% endif %}

 

 

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.

Adrian2021
Excursionist
13 0 6

Brilliant, that worked perfectly! Thanks Oliver!