This custom code snippet lets you change the default message shown on Super password-protected pages.
It is useful when you want to make the password page feel more personal, helpful, or specific to the page visitors are trying to access.
You can set one default message for all password-protected pages, and optionally add different messages for specific pages.
Sample output:
Installation instructions
- Open your site in the Super Dashboard.
- Open the Code page.
- In the Head tab, paste the following snippet:
- In the Body tab, paste the following snippet:
- Save your changes.
- Open your Super site and refresh the password-protected page.
Note: Please read the commented message in the code
<script>
window.SuperPasswordPageConfig = {
defaultMessage: "Welcome to my private page",
pageMessages: {
"/map": "No access.",
"/pont-de-la-tournelle": "This page is under construction by Melvin.",
// "/members": "Members only. Please enter your password."
}
};
</script><script src="https://cdn.jsdelivr.net/gh/super-so/super-so.github.io@master/password/super-password-page.js"></script>How to edit the message
You can update the main password page message by changing the defaultMessage text.
Example:
defaultMessage: "This page is private. Please enter the password to continue."You can also edit messages for each page as desired.
pageMessages: {
"/map": "This page is under construction.",
"/members": "Members only. Please enter your password."
}The page path should match the URL path of the page.
https://example.com/membersThe matching path would be:
"/members"Optional style customization
If you want to customize the appearance of the password page, go to Code > CSS in your Super dashboard and paste the custom CSS below.
You can then update the values in the code, such as the font size, colors, spacing, and alignment, to match your preferred design.
Example:
Notes and limitations
- The code works only on Super password-protected pages.
- The
defaultMessageapplies to all password pages unless a page-specific message is added. - Page-specific messages only work when the path matches the page URL.
- If your site uses heavy custom code, third-party scripts, or custom password page styling, additional testing may be needed.
- This snippet changes the visible message only. It does not change how Super’s password protection works.
- After updating the code, refresh the live site to check the result.