Can I create a custom template for privacy, refund, and service terms?

Hello :slightly_smiling_face:

Is is possible to have your own template for Privacy policy, Refund Policy and Terms of service?

Thanks in advance

Any solutions??

I was looking to do something similar. I couldn’t find a way to edit the way the page was displayed. The solution for me was to create separate pages for the legal pages and then copy and paste the text from the legal pages in shopify settings. e.g. Privacy policy, Refund Policy and Terms of service.

This allowed me to edit the content and display the page how I wanted.

Hope this helps.

Here’s my take on it: the policy objects are global and can be pulled into any page on the site. My guess is that the privacy policy is a global object in case it needs to be pulled into other pages such as contact forms.

Ignore the default layout and copy page.liquid, calling it something like page.privacy-policy.liquid.

Inside this template, you have access to four pieces of content:

  1. page.title - the page title of this page
  2. page.content - the content for this page (this could be used as an introduction to the privacy policy
  3. shop.privacy_policy.title - the title for the privacy policy itself
  4. shop.privacy_policy.body - the content of the privacy policy

Create a new page called Privacy Policy and apply your new template to it. Fill out the heading and introduction copy and save the page. Add it to the navigation of your site. Note that the automatically generate Privacy Policy page can be found from a pop-up which appears from the link field, once it has focus - do not select this page! Instead, from the same pop-up menu, select Pages and then your new Privacy Policy page should be available as an option.

Unfortunately, you’ll need to repeat this process for the other policy pages, which will require unique templates too.

3 Likes

Even though this thread is old I’d like to weigh in that the proposed solution causes issues when you’re using the Google app in Shopify to sync your products with Google Merchant Center.

To sync your products, Google requires that your Refund Policy is added to the footermenu of your pages. I created a page and included the policy-text there and linked that in the footermenu.

However, this is not accepted. It HAS to be the Shopify-created policy pages for some reason.

I am still looking for a solution to change these policy page templates because they are not in line with how my other pages look; they’re narrower than other pages and the title is un-changeable. Any help would be welcome.

Nevermind this reply… After posting my response, I realized that I had pretty much just repeated what @Ross_Angus has recently posted. I misread his post, and Shopify doesn’t give an option to delete your post, so here we are. Absolutely do what he said above. :+1:

When taking into consideration the response from @MsMinis , where the policy must exist as a Policy and not a page, I’ve decided to go with the following option…

CSS Rule to go full width…

.shopify-policy__container {
        max-width: none;
    }

Within the content of each policy, I’ve switched to code view and added the following to the top…


# ENTER YOUR TITLE HERE

I’ve then closed that code up at the bottom of the content for each policy…


Finally, I’ve added another CSS rule to hide the default title…

.shopify-policy__title {
        display: none;
    }
2 Likes

.shopify-policy__container { max-width: none; } works great!, thank you!

2 Likes

Hi - where does the css reside? is there a css file for policies in liquid assets? I couldn’t find it.

This solution doesn’t do anything about the existing policy pages too, right? The policies will still be accessible via policies/privacy-policy, etc.

Hi, i have some kind of solution.

First create file under sections folder and name it as you like (main-policy.liquid). Add your html code and {% schema %}. For location there you want to display policies content use this code:


   {%- for policy in shop.policies -%}
      {% if policy.url == request.path %}
         # {{ policy.title }}
         {{ policy.body }}
      {% endif %}
   {%- endfor -%}

Now to make it work edit theme.liquid file and replace {{ content_for_layout }} with the code below:

{% if request.path == shop.refund_policy.url or request.path == shop.privacy_policy.url or request.path == shop.terms_of_service.url or request.path == shop.shipping_policy.url %}
   {% section 'main-policy' %}
{% else %}
   {{ content_for_layout }}
{% endif %}

hope it helps

1 Like

I tested this and confirmed it works. Perfect solution for me, exactly what I was looking for. Thank you!