Skip to main content

DiviPasswords

Protect Divi sections, rows, columns, and modules with passwords. Hide content until the correct password is entered.

Updated this week

With DiviPasswords, you can easily protect specific content blocks on your Divi site and ensure that hidden content is only available to users with the correct password. It's secure, compatible with Divi’s core tools, and easy to set up.

Installation

  1. Install and activate the Divi Theme.

  2. Go to WordPress Dashboard → Plugins.

  3. Click on the Add New Plugin button.

  4. Click on the Upload Plugin button.

  5. Choose the zip file.

  6. Click on the Install Now button.

If purchased through DonDivi, enter your license key under DonDivi → Licenses to receive plugin updates.

DiviPasswords is plug & play. Once activated, its fields will appear in the settings modal of any Section, Row, Column, or Module (including DonDivi modules).

Overview

DiviPasswords allows you to protect any Divi Section, Row, Column, Module, or DonDivi module with a password.

DonDivi - DiviPasswords Overview

When enabled, the selected element is hidden and replaced with a password form. The original content is only added to the DOM after the correct password is entered, preventing access via browser tools or page inspection.

Fields & Settings

DonDivi - DiviPasswords Settings

Location of Fields

All settings are found under the Advanced Tab → Password in any supported Section, Row, Column, or Module.

  • Password Protection (toggle): Enable this to activate the password form for the selected element.

  • Use Padlock Icon: If enabled, a padlock icon appears at the top of the password form. If disabled, an image is shown instead.

  • Title: Customize the form’s title. The default is "RESTRICTED ACCESS".

  • Password: Enter the required password. This field must not be empty, and the following characters are not allowed: &, <, >.

  • Placeholder: Set a custom placeholder for the input field. The default is "Enter your password…".

  • Button Text: Set the label for the submit button. The default is "Submit".

  • Remember Password: If enabled, the password will be remembered using a browser session cookie.

  • Form Color: Pick a color for all elements in the password form.

  • Cookie Behavior:

    • Name: divi_passwords

    • Expires: At end of session (when browser closes)

    • Cookie is only created if Remember Password is enabled.

Troubleshooting

Form Not Displayed

  • Ensure Password Protection is enabled.

  • Confirm the Password field is not empty.

“An Error Has Occurred” Message

Cause: WordPress nonces used in the form are cached and become invalid after a while.

Solutions:

Protected Content Not Displayed Correctly

Cause: Some modules/plugins rely on JavaScript, which is executed at page load, to initialize their content. Since DiviPasswords removes the HTML from the DOM until the correct password is entered, JavaScript may fail to initialize.

Solutions:

  1. Use DiviPasswords with Divi or DonDivi modules.

  2. Contact the plugin author and request compatibility with DiviPasswords. They must listen to the divipasswords event.

    jQuery('body').on('divipasswords', function() {
    // Initialize plugin content
    });

You can paste this in Divi → Theme Options → Integration → Body or use a Divi Code Module.

Advanced

CSS Selectors

  • .dd-password-protect → Wrapper

  • .dd-password-protect form → The form itself

  • .dd-password-protect .et-pb-icon → Padlock icon

  • .dd-password-protect image → Placeholder image

  • .dd-password-protect .et_pb_blurb_container → Inner content

  • .dd-password-protect h4 → Title text

  • .dd-password-protect .dd-password → Password input

  • .dd-password-protect .dd-password-error → Error message

  • .dd-password-protect button → Submit button​

Adding Support to Custom Divi Modules

You can make your own Divi module compatible with DiviPasswords by adding it to the supported modules list via this filter:

function add_my_module($modules) {
$modules[] = 'my_module_slug';
return $modules;
}
add_filter('divi_passwords_supported_modules', 'add_my_module');

JavaScript Integration for Other Plugins

To reinitialize JavaScript-dependent plugins once protected content is revealed, listen to the divipasswords event:

jQuery('body').on('divipasswords', function() {
// Initialize plugin content
});

Videos

Did this answer your question?