I would like to remove the collection name from a product URL

Solved
Amanda05
Excursionist
22 0 2

Hi

I am using Debut theme. I have 1 collection that is shown on the homepage and has 3 products. I would like to have the URL just show the product not the path via the colleciton, for example it currently looks like

https://www.amisoleil.com.au/collections/frontpage/products/beach-tents

but I would like it to just be https://www.amisoleil.com.au/products/beach-tents

to keep it cleaner

Im just not sure where to make the change

Thank you in advance

Amanda

 

0 Likes
Tejas_Nadpara
Shopify Partner
1027 215 476

This is an accepted solution.

@Amanda05 

 

Replace the product.url in your collections template or other templates where collection product links are used.

{{ product.url | within: collection }}

and replace with

{{ product.url }}

product-url (1).png

 

Cheers,

Tejas

Shopify Expert | Skype: tejas.nadpara
- Like and Mark as an Accepted Solution if reply helpful
- Feel free to contact me on support@hexaecommerce.com regarding any help
Amanda05
Excursionist
22 0 2
Thank you

I'm having trouble finding that line of code anywhere in my stores theme
(Debut)?
0 Likes
Tejas_Nadpara
Shopify Partner
1027 215 476

This is an accepted solution.

@Amanda05 

 

It should be in Snippets > product-card-grid.liquid file (second line code).

Let me know if you still not able to find it.

 

Thank you,

Tejas

Shopify Expert | Skype: tejas.nadpara
- Like and Mark as an Accepted Solution if reply helpful
- Feel free to contact me on support@hexaecommerce.com regarding any help
Amanda05
Excursionist
22 0 2

Amazing THANK YOU!

0 Likes
Coryum
Tourist
13 0 1

Hi Tejas! I'm update my Retina theme from 4.3 to 4.6 and it changed my url like before, with the name of collection. Can you help me with the section where I can find the code to edit? Thank you!

 

***EDIT*** I found the right section with Retina theme 4.6.3. It is: product-thumbnail.liquid

 

THank you Tejas!

 

0 Likes
rahuljindal28
New Member
1 0 0

I couldn't find that in Aries Shopify Theme? Is there any way to remove /collection/ from the product URL structure in Aries Theme

0 Likes