How to hide a section on a particular collection page

Hello! I am using the Dawn theme, and have created a button (using the “Rich Text” section) that displays at the bottom of every product collection. This button is called “View all products,” and it leads to the product catalog that shows every product (with the URL subdomain “/collections/all”). However, this same button appears at the end of the page it led to, below all of the products, and clicking on it simply refreshes the page.

I would like to hide this button from the “/collections/all” subdomain but keep it on every other product collection page. How would I do this? Would I use logic to identify this page by the URL, or the lack of product filters, or is there another way? Thank you in advance for the help!

@GatesGems Use a custom-liquid block instead and wrap the button code in liquid logic like the following

{%- unless collection.handle == "all" %}

{%- endunless -%}
2 Likes

@PaulNewton Thanks for the suggestion. Where can I find the code for the button that already exists so I can paste it in? More specifically, which file(s) in the Dawn theme code contain(s) the sections on the product pages, and how can I identify the code for this particular button?