Shopify themes, liquid, logos, and UX
I just noticed that if I go to a product on my store then remove everything in the URL after /products/ I get a page of my collections that is super ugly. Is there a way to not show that URL or redirect them back to the home page.
Or can someone tell me how to find where I can edit that page?
Thanks
Solved! Go to the solution
This is an accepted solution.
Hi @kinozoom,
Shopify's URL redirect feature won't work for that URL, but you can add some code to your website to redirect users.
Just add this code to your theme.liquid file, just after the <head> tag.
{% if request.path == '/products' %}
<script>window.location.href="/"</script>
{% endif %}
This should redirect any users who visit the /products page back to your homepage.
Lee
Hello @kinozoom
That is the URL to show all collections on your store. There is no way to hide or redirect it.
This is an accepted solution.
Hi @kinozoom,
Shopify's URL redirect feature won't work for that URL, but you can add some code to your website to redirect users.
Just add this code to your theme.liquid file, just after the <head> tag.
{% if request.path == '/products' %}
<script>window.location.href="/"</script>
{% endif %}
This should redirect any users who visit the /products page back to your homepage.
Lee
User | RANK |
---|---|
207 | |
166 | |
77 | |
56 | |
54 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023