WordPress allows a password to be set for pages and posts. When a password is set, users will only see the content once the password has been correctly entered. Here's how to set that password when using the Divi Theme.
Set Password in the Block Editor
1. Click on "Document" in the sidebar
2. Click "Status & Visibility" to expand the visiblity options
3. Click on the current value of the "Visibility" option (e.g. "Public") to open the "Post Visibility" popup
4. Set "Post Visibility" to "Password Protected"
5. Enter your desired password in the field marked "Use a Secure Password". The Visibility setting will update to "Password Protected" and clicking elsewhere in the post will close the popup
Set Password in the Classic Editor
* You are using an older version of WordPress
* You are using the Classic Editor plugin
* You have enabled the classic editor or the "Latest Divi Builder Experience" from within the Divi Theme Options (under "Builder > Advanced")
To set the password in the classic editor:
1. Locate the "Publish" box in the classic editor screen sidebar
2. Click on the "Edit" link next to the "Visibility" option
3. Set the "Visibility" to "Password protected"
4. Enter your desired password in the "Password:" box
5. Click "OK"
Setting the Password in the Divi Visual Builder
1. Click on the "Edit Post" or "Edit Page" link in the admin bar at the top of the visual builder screen.
2. Set the password following the instructions for the Block Editor or Classic Editor above, as applicable
3. Save your changes
4. Return to the visual editor to complete editing of your post / page
Accessing a Password-protected Page / Post
Styling the Password Entry Form
Divi doesn't offer much in the way of options for changing the look of the password entry form or password protected page / post.
To address this, I created the Divi Password Box module, which replaces the default Divi password entry form with a highly-configurable module, and enables editing of the entire password protected page / post using the Divi Builder.
Hey Dan,
I'm trying to figure out why this doesn't work when you want to password protect a woocommerce product. Any ideas?
Hi Jared, I'm not sure… I did a test and was able to password protect a woocommerce product without any issues. One thing to watch out for is caching – if the page is cached the unprotected version of the page might be cached and getting used each time. In general it's a good idea to exclude any password protected pages from being cached (you can usually configure this in the settings of any caching plugin, etc, that you're using). If that doesn't seem to be the issue, is there any chance you're able to share a link to the page you're working on (privately via the contact form, if you like), so that I can take a look? Also, if you can, let me know what seems to be failing (i.e. you can't find the place to enter the password, or the password box doesn't show on the front end, etc). Thanks!
I've built the page with divi and everything looks great. I password protect it and all formatting gets messed up. How can I fix this?
Hi Amanda, the first thing I'd do is ensure that the page is excluded from caching in any performance plugins you use. If that doesn't help, is there any chance you're able to send through a link to the page, and a copy of the password, so that I can take a look for you? You can send it via the contact form if you don't want to share it here. Thanks!
My password protection is not working. It keeps referring back to the password prompt. Yes i have the correct password. Any ideas?
Hey Andy, two things to check are:
* Is the page cached? If so, it might be that the password prompt version of the page is being cached and used regardless of the password validity. In this case, excluding the page from the cache (most caching plugins / solutions will have a way to exclude certain pages), and clearing the cache should solve it.
* Are cookies blocked? WordPress sets a cookie when the correct password is entered, but if you have cookies disabled in the browser, or are using a cookie acceptance plugin (such as are commonly used for GDPR compliance) and have previously clicked to disallow cookies, then WordPress would not be able to set the cookie it usually does. Temporarily disabling any such plugin and ensuring the browser is configured to accept cookies should show reveal if that's the case.
If neither of those things help, perhaps you could send me a link to the page you're working on (along with the password) via the contact form so that I can take a look? Thanks!