Want to password-protect pages and posts in the Divi theme but don’t know how to do it? Don’t worry; I am here to help you with this problem.
Password-protecting pages and posts in WordPress are one of the most basic things you need to do to protect your website. Whether you own a small personal blog or a big eCommerce store, there are a few posts or pages that are more exclusive and to be served to only a few types of users only.
To narrow this problem, I have researched and written this article to provide the solution to those who are using the Divi theme on their website. In this in-depth guide, you will get step-by-step instructions on how to password-protect pages and posts effortlessly.
Let’s get started!
Why Password Protect Pages & Posts in Divi?
Divi is a widely used theme in WordPress that offers a great visual builder. As with any other platform, there are always those people who are trying to gain access to your website for malicious purposes.
One of the strategies for preventing this is to password-protect certain pages and posts on your WordPress site. This will allow you to keep certain content available to those who have access to the password while giving protection to those pages that would be best kept away from prying eyes.
Of course, there are tons of reasons why you might want to password-protect a page or post. It could be that you want to offer a certain page as a premium page for purchase, or you might want to keep a certain page private for certain users. Whatever your reason, here is a simple guide to password-protecting pages or posts in WordPress.
How to Password Protect Pages or Posts in Divi Without Plugin
The first method that we are going to password protect pages and posts in the Divi theme is without using any WordPress plugin. By default, WordPress allows us to set passwords to any post or page.
To start the process, visit your WordPress dashboard and open any post or page. You can also create a new post or page.
Next, click on the “Settings” icon available on the right side of the editor, as shown in the above image.
Here, click on the “Visibility” option, and you will see three options:
- Public: The public option makes the post or page available to anyone on the Internet.
- Private: The private option makes the post or page available only to admins.
- Password Protected: This visibility option allows you to set passwords to posts or pages. Without a password, no one can access the page content.
Simply select “Password Protected” and enter your desired password in the available box as shown in the above image. To make your password strong, include over eight characters with letters, numbers, and special symbols.
Now, simply publish your post or page and see the live preview on your website. Only people with the right password can access the page content. As you can see in the above image, users are requested to enter the password before accessing the page content.
Now, if you are someone who is using the older “Classic Editor,” then are quick steps to password-protect pages and posts in the Divi theme:
- Open any post or page.
- Navigate to “Visibility” from the right sidebar.
- Select “Password protect” and enter your desired password.
- Save the post or page and see the live preview.
How to Password Protect Pages & Posts in Divi Using Plugin
In this method, we will use a WordPress plugin to password-protect pages and posts in the Divi theme. There are many plugins available to do this job, but I highly recommend using PPWP (Password Protect Pages). This plugin is perfect for securing any page or post, and it also comes with lots of features like shortcodes, whole site protection, custom post type protection, and many more.
First, navigate to “Plugins > Add New” and search for PPWP, install and activate the plugin as shown in the above image.
Now, simply open any post or page that you want to protect. Here, you will see a box at the right side of the page with the name “Password Protect WordPress”. Now, you need to select the role and insert the password.
As you can see here, I want to password-protect the post for all the users who visit it; hence I am selecting the “Global” option. After inserting the password, just “Submit” and publish your post.
Now, when you visit the page, you will see an option to insert the password. Once you insert the right password, you can access the page content as shown in the above image.
How to Password Protect Blocks of Content on a Divi Page & Post
You have learned how to password-protect pages and posts using the above methods. However, sometimes you also have to protect certain content sections so that only a few visitors or subscribers can access that section of content.
The PPWP plugin helps you with this problem as it provides the feature to protect blocks of content using shortcodes. To start the process, navigate to “Password Protect WordPress > Partial Protection” and enable the option “Use Shortcode within Page Builders” as shown in the above image.
Next, open any page and add the below code in the same structure as mentioned:
Your protected content
Here is how the code will look like when you apply it to the WordPress editor:
You can also define who can access protected sections directly without entering a password using the “whitelisted_roles” shortcode, as mentioned below.
[ppwp passwords=”password” whitelisted_roles=”administrator”]
Your protected content
That’s it! Now, you know how to password-protect pages, posts, and even blocks of content in the Divi theme.
Frequently Asked Questions (FAQ)
Still have doubts? Here are a few FAQs that are generally asked by our readers.
Q. Can you password-protect a WordPress post?
Yes, you can definitely password-protect WordPress posts. WordPress offers a default setting to enable protection on any post you want. Simply enter the password and save the changes.
Q. How do I password-protect multiple pages in WordPress?
WordPress allows you to password-protect as many pages as you want. There are no limitations on the number of pages. However, if you want to assign the same password to all the pages, then I recommend you use the PPWP plugin, as it enables you to assign a master password to all pages at once (without opening each page individually).
Q. How do I password-protect an entire WordPress site?
You can password-protect the entire WordPress site by using plugins like PPWP. By default, WordPress doesn’t have any setting to password-protect the entire website.
Q. How do you password-protect a page in Divi?
It is very easy to password-protect a page in Divi. You can use the default WordPress setting or can also use plugins to protect pages.
Finally, we have password-protected pages and posts in the Divi theme by both using a plugin and without a plugin. You can choose any method you want to protect your landing pages. I recommend you use the default WordPress option, as you don’t have to install any additional plugins.
The above guide is very simple to follow; however, if you face any issues, feel free to comment below. I will try to help you out! Also, don’t forget to share it with your friends.