All things Shopify and commerce
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I want to remove the default policy pages so that the URLs don't work (even if you there is nothing on the page, they are still there). I don't know if it's different with different themes because there are other Shopify sites I have gone on and they don't have the default policy pages, and they definiteý haven't done any manual work to remove them.
Solved! Go to the solution
This is an accepted solution.
@krishcharan Are you familiar with the code? cause it needs to have some custom code for this and some conditions on that class.
So if you want me to do so then don't hesitate to send me a collaborator request so I can do it for you.
Best Regards,
Rock Technolabs
This is an accepted solution.
https://akcapparel.com/
Shopify had policy pages there by default, whether there was any content in them or not. There was no option for me to remove the pages/URL/link to the pages so for example if someone typed https://akcapparel.com/policies/refund-policy - it would still take them to that page.
The other user basically added code where any url that has the "policies" part in it, will just lead to page not found, just like it would with any other invalid URL. I don't see the issue? This should be the code -
<main id="main" role="main">
{% if request.path contains '/policies/' %}
<div class="EmptyState">
<div class="Container">
<h3 class="EmptyState__Title Heading u-h5">{{ '404.general.title' | t }}</h3>
<p class="EmptyState__Description Text--subdued">{{ '404.general.content' | t }}</p>
<a href="/" class="EmptyState__Action Button Button--primary">{{ '404.general.button' | t }}</a>
</div>
</div>
{% else %}
{{ content_for_layout }}
{% endif %}
</main>
Hello @krishcharan Please share your store URL. So I can check and help you out.
https://akcapparel.com/
I have included links in the footer (excluding "Terms & Conditions" - this is a page I made, and what I intend to do for all the policies)
This is an accepted solution.
@krishcharan Are you familiar with the code? cause it needs to have some custom code for this and some conditions on that class.
So if you want me to do so then don't hesitate to send me a collaborator request so I can do it for you.
Best Regards,
Rock Technolabs
I'm not really familiar with the code, I would really appreciate the help! Is it possible for me to send you a collaborator request or do you need to request it for the site?
Please share your store .myshopify domain URL So I can share the request.
Accepted 👍
what's your store name?
AKC Apparel
Just clear your policy content and wait a second, I assume
I appreciate you taking the time to try to help but like I stated, there is nothing there, but the pages are still there by default.
To remove default policy pages in Shopify, go to "Online Store" > "Pages," edit each policy page, set it to "Hidden" in the "Visibility" section, and save changes. This will make the URLs inactive. Other Shopify sites might use custom themes or hide these pages similarly.
It does not show any of the policy pages there. My theme is Prestige.
This can be done easily by just deactivate the button for it if you are using most of the new themes in shopify like Dawn Theme
If not there are multiple ways to be done, I will be more than happy to assist you on this but you need to give me access to your store to do it for you.
let me know if you can find the mentioned button or not so I can help you on this.
Have a nice day.
Hi, I use the Prestige theme but it is outdated so I think maybe that's why that option isn't there. But another user has helped solved the issue by redirecting the policy URL/links to a 404 page not found page.
we can hide all the links with code you don't need to redirect for this its not professional, please give me access to your store to fix this for you if you didn't find a solution for it yet.
Is there really any difference? If you enter the link/URL it just leads straight to page not found.
Why do you have a link if there is no page attached to it.
Can you share your store url please
This is an accepted solution.
https://akcapparel.com/
Shopify had policy pages there by default, whether there was any content in them or not. There was no option for me to remove the pages/URL/link to the pages so for example if someone typed https://akcapparel.com/policies/refund-policy - it would still take them to that page.
The other user basically added code where any url that has the "policies" part in it, will just lead to page not found, just like it would with any other invalid URL. I don't see the issue? This should be the code -
<main id="main" role="main">
{% if request.path contains '/policies/' %}
<div class="EmptyState">
<div class="Container">
<h3 class="EmptyState__Title Heading u-h5">{{ '404.general.title' | t }}</h3>
<p class="EmptyState__Description Text--subdued">{{ '404.general.content' | t }}</p>
<a href="/" class="EmptyState__Action Button Button--primary">{{ '404.general.button' | t }}</a>
</div>
</div>
{% else %}
{{ content_for_layout }}
{% endif %}
</main>
thank you, working
Not the best solution, as it visually displays a 404 error, but it's just an image. The page continues to be indexed and negatively affects your site's search results. I'm not sure how to solve this issue yet, but I know it's possible because there are shops that display the correct error on URLs where a policy page should be.
Hey folks! I just wanted to share that you can setup a URL redirect for any page that results in a 404 on your store. This can be done from within your store admin under Online Store > Navigation. There will be a button in the upper right that says "View URL Redirects", which is where you can go to view or create new URL directs for your store. You can learn more about this here: Shopify - URL Redirects.
Shay | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
How would you do it from the code if you are not able to edit the default policies pages/routes from the code?