Don't use /collections/name/ in products URL

Hey everyone,

I could use some help with an issue I’m having. So, whenever I click on a product, the URL contains “/collections/name” like this:

URL: https://wrapsify.com/collections/motorcycle-gifts/products/classic-bike-keychain-to-my-man-ride-safe-always-come-home-to-me-gkt26005

But what I actually want is just this: https://wrapsify.com/products/classic-bike-keychain-to-my-man-ride-safe-always-come-home-to-me-gkt26005

I find the extra “/collections/motorcycle-gifts” part unnecessary and would prefer a cleaner URL like “Collections - Wrapsify…”.

Does anyone know how I can fix this?

Thanks in advance!

Hi @wrapsify
For such URLs, there is a within: collection filter in your code, you have to remove it to get rid of it.
Thanks!

I want to remove /collections/ when accessing /products/ pages, is there any tutorial article?

No, actually you will find it in a file product-item.liquid, product-card.liquid or similar file

It depends upon theme and you need some liquid knowledge to remove it so that you don’t remove any other part

Thanks!

You have a Turbo theme.

I do not know if your theme is the same version as the one I have, but in mine it’s necessary to modify the following files:

In Sections:

product-recently-viewed-template.liquid

In S**nippets:

collection-swatch.liquid

product-details.liquid

product-slider.liquid

product-thumbnail.liquid

quick-shop-button.liquid

You need to search for “| within: collection” and remove these found strings.

For example, in snippets/collection-swatch.liquid there is code like:


This needs to be modified to be like:

```markup

There may be multiple occurrences in some files.

*And do not forget to make a theme duplicate before you proceed with any modifications!*