The password.liquid template is used to render your shop's password page. The password page is only seen if you choose to password protect your storefront.

Template Considerations

Outputting the password form

To output a form that visitors use to enter your password protected storefront, initialize the form tag with the parameter 'storefront_password'. Within the form, include the following:

  • Input of type password with the name attribute password
  • Input of type submit to submit the form.

Below is an example of a simple password form:

{% form 'storefront_password' %}

{{ form.errors | default_errors }}

<label for="password">Enter store using password: </label>
<input type="password" name="password" size="30" />
<input type="submit" value="Enter" />

{% endform %}

Requirements for the Theme Store

If you're looking to submit your theme to the Theme Store, the password.liquid template of your theme must meet the following conditions:

  • Error messages are output properly