All things Shopify and commerce
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:
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-gkt26...
I find the extra "/collections/motorcycle-gifts" part unnecessary and would prefer a cleaner URL like "wrapsify.com/products/...".
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 Snippets:
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:
<a href="{{ variant.url | within: collection }}" class="swatch" ...
<a href="{{ variant.url }}" class="swatch" ...
There may be multiple occurrences in some files.
And do not forget to make a theme duplicate before you proceed with any modifications!
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025