How to add a back button on trade theme

hi

Im trying to add a back button to the main collections main under ALL COLLECTIONS. can anyone help?

https://www.dailythings.sg/

pw-080790

1 Like

@Dailythings its easily you can do this can you just go to theme customization open collection page and just open collection section then enable add to cart button show

im trying to add a ā€œbackā€ button.. not a add to cart button tho

Hey there,

To add a back button to the main collections page under ā€œAll collectionsā€ in your Shopify store, you’ll need to edit the collection template file. Here’s a general approach to accomplish this:

  1. Go to your Shopify admin panel.
  2. Navigate to Online Store > Themes.
  3. Find your current theme and click ā€œActionsā€ > ā€œEdit codeā€.
  4. In the template directory, look for a file named ā€œcollection.liquidā€ or something similar (it might be in a ā€œtemplatesā€ subfolder).
  5. Add the following code snippet where you want the back button to appear, typically near the top of the file:
{% if collection.handle == 'all-collections-feature-tea-sake' %}
  
    
      ← Back to Home
    
  

{% endif %}

This code will add a ā€œBack to Homeā€ button only on your main collections page with the handle ā€˜all-collections-feature-tea-sake’. The button will link back to your store’s homepage. You may need to adjust the styling to match your store’s design. The current style is a basic gray button that darkens on hover.

Feel free to reach out in case you need any help with this. I’d love to do this for you :slightly_smiling_face:

Cheers!

Shubham | Untechnickle

How do i change the button to back to previous page any idea?

To go back to the previous page, and not the home page always please use this code:

{% if collection.handle == 'all-collections-feature-tea-sake' %}
  
    
      ← Back
    
  

  

  
{% endif %}

Do Like and Accept the Solution so that others can also benefit from this.

Cheers!
SV | Untechnickle