Shopify themes, liquid, logos, and UX
Hi all,
I would love to know if I am able to remove or re-direct someone from the collections overview page.
For example
yourstorename.com/collections
This brings them to all the collections I have on my store, if they manually key this in.
Am I able to re-direct this, I've tried some ways but all seems futile.
Solved! Go to the solution
This is an accepted solution.
Hi @YogaBear
1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find layout > theme.liquid and paste this at the bottom of the file:
<script>
document.addEventListener("DOMContentLoaded", function() {
// Check if the current URL is the collections overview page
if (window.location.pathname === "/collections") {
// Redirect to your desired URL
window.location.href = "/collections/all";
}
});
</script>
This is an accepted solution.
Hi @YogaBear
1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find layout > theme.liquid and paste this at the bottom of the file:
<script>
document.addEventListener("DOMContentLoaded", function() {
// Check if the current URL is the collections overview page
if (window.location.pathname === "/collections") {
// Redirect to your desired URL
window.location.href = "/collections/all";
}
});
</script>
Hi @YogaBear
Thank you for your response. It's good to know that it's worked for you. Kindly feel free to get back to me if you need any further assistance.
If helpful then please Like and Accept Solution.
Hey, I was wondering if you could assist me on how to customize the url. For example instead of yourbrandname.com/collections its yourbrandname.com/inventory.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024