I need help making this page password protected.
Hello @awakenesti
To password-protect the page, you have a few options:
Option 1: Use Shopify’s Built-in Password Protection
Shopify only allows password protection for the entire store, not individual pages. If you want to restrict access to a specific page, you’ll need custom code.
Option 2: Use Liquid to Restrict Access
You can modify your page.acne-portal.liquid file (or page.liquid if it’s a general template) and add a password form.
Steps:
1.Go to Online Store > Themes.
2.Click Edit Code for your current theme.
3.Open page.acne-portal.liquid (or create a new page template if needed).
4.Add the following Liquid & JavaScript code:
{% if customer %}
{{ page.content }}
{% else %}
This page is password protected. Please enter the password to continue.
Incorrect password. Try again.
{% endif %}
How It Works:
If a customer is logged in, they can access the page.
Otherwise, a password form appears.
Upon correct entry, a cookie is set to grant access.
Refreshing the page allows access without re-entering the password.
Thank you ![]()