How to Password Protect Partial WordPress Content (5 Easy Steps)

apply partial content protection on a WordPress post or page

Sometimes, you want visitors to read most of a WordPress page but require a password to access one specific section. You might offer a free article preview, share a private download, or display public product information while restricting access to a bonus resource.

WordPress’s built-in password protection doesn’t let you lock just one section of a page or post. It protects the post’s content as a whole.

Password Protected Pro solves this problem with Partial Content Protection. You can wrap selected content in a shortcode, assign a password, and keep the surrounding content available to visitors.

In this guide, you’ll learn how to password protect part of a WordPress page or post, use the feature with supported page builders, and test the result before sharing it.

What Is Partial Content Protection in WordPress?

Partial content protection lets you restrict access to a selected part of a WordPress page or post without hiding the entire page. Visitors can read the public sections, but they must enter the correct password to access the protected part of a WordPress post or page.

Partial protection works well when you want to:

  • Offer a preview of premium content.
  • Share private resources with clients.
  • Restrict access to a downloadable guide or bonus material.
  • Show product information publicly while protecting a special offer.
  • Keep an article accessible while gating one specific section.

WordPress doesn’t include a built-in feature for password protecting specific sections. You’ll need a content protection plugin that supports partial content protection.

What You Need Before You Start

For this tutorial, you’ll use Password Protected Pro and its Partial Content Protection feature. The feature is available in the Business plan, so check the current pricing page before purchasing or upgrading.

You’ll also need:

  • Access to your WordPress dashboard.
  • The free Password Protected plugin and a compatible, activated Pro version.
  • A published or draft page or post where you want to place the protected content.

You don’t need any technical or coding knowledge to implement this partial protection. The plugin provides a shortcode that marks the beginning and end of the protected section.

How to Password Protect Part of a WordPress Page or Post

Follow these steps to create a password and apply it to a specific content section.

Step 1: Install and Activate Password Protected Pro

First, install the free Password Protected plugin from your WordPress dashboard.

  1. Go to Plugins → Add Plugin.
WordPress dashboard Plugins menu with Add Plugin option highlighted
  1. Enter “Password Protected” in the search bar at the top right.
Searching for Password Protected in the WordPress plugin search bar
  1. Click Install Now, then Activate.
Activate button on the Password Protected plugin card in WordPress
  1. Visit the Password Protected pricing page and choose the Business plan for Partial Content Protection.
  2. Download the Pro plugin ZIP file from your email and copy the license key for later use.
  3. Return to Plugins → Add Plugin → Upload Plugin.
WordPress Upload Plugin screen with Choose File option for a ZIP file
  1. Upload the ZIP file and click Install Now.
Password Protected Pro ZIP file selected with Install Now button highlighted
  1. Activate the Pro plugin and enter your license key if prompted.
Password Protected Pro license key field with Activate License button

You’ve now installed and activated Password Protected Pro. Make sure both the free and Pro plugins are active before continuing. Just make sure the free and Pro versions are compatible and active before proceeding.

Step 2: Enable Partial Content Protection

After you activate the Pro plugin, enable partial content protection for your WordPress site.

  1. Navigate to Password Protection → Content Protection.
Password Protected menu in WordPress with Content Protection option highlighted
  1. Open the Partial Content Protection tab.
Partial Content Protection tab in Password Protected Content Protection settings
  1. Turn on Partial Content Protection.
  2. Click Save Changes.
Enable Partial Content Protection toggle turned on with Save Changes button

The partial content protection feature is now enabled.

Step 3: Create a Password for the Protected Section

  1. Go to the Multiple Passwords tab and select Add New Password.
Multiple Passwords tab in Password Protected with Add New Password button highlighted
  1. Configure the password using the available fields:
  • Title: Give the password an internal name that helps you identify its purpose, such as “Client Resource Download.”
  • Password: Enter a password or use the available password-generation option.
  • Usage limit: Set how many times visitors can use the password to limit access.
  • Expiry: Set an expiration date so the password stops working after a specific time.
  • Status: Make sure the password is active when you want visitors to use it.
Add New Password form with Title, Password, Usage Limit, Expiry, and Status fields
  1. Save or publish the password entry using the button shown in your plugin interface.
Bypass URL and Redirect options marked to skip, with Publish button highlighted

The plugin generates a shortcode for the password. You’ll use that shortcode to identify which section of the page or post it protects.

Important: Partial Content Protection does not support the Bypass URL or redirect-to-page functionality. Don’t configure either option for this workflow.

Step 4: Copy the Generated Shortcode and Protect Your Content

After publishing the password, you will be redirected to the Multiple Passwords tab, where you will find all created passwords. 

  1. On the right side of the password record, you will find a shortcode column; find the one you want to use.
Shortcode column in Manage Passwords list for partial content protection passwords
  1. Copy the generated shortcode. The shortcode follows this general pattern: [password_protected id=”1″][/password_protected]. The number is illustrative. Use the actual shortcode generated by your plugin, rather than copying the example ID.
  2. Go to Pages → All Pages. 
WordPress Pages menu with All Pages option highlighted
  1. Click on Edit under your WordPress page or post. 
Edit link under a page title in the WordPress All Pages list
  1. Open the page where you want to apply partial protection and locate the exact section you want to restrict.
  2. When you paste the shortcode, it will look like “[password_protected id=”1″][/password_protected]”.
Password Protected shortcode pasted into a WordPress Shortcode block

Remember the partial protection area starts from [password_protected id=”1″] and ends at [/password_protected].

  1. Remove [/password_protected] from the shortcode and place it in a new shortcode widget at the end of the part that you want to protect or hide.
Page content placed between opening and closing password_protected shortcodes
  1. Save the page, and this is what it will look like.
Password prompt shown on the front end for a protected section of a WordPress page

Everything between the opening and closing shortcodes requires the correct password, while content outside them remains visible to everyone. Make sure the closing shortcode comes after all the content you want to protect to avoid leaving part of the intended section unprotected.

Step 5: Test the Protected Section

Don’t assume the setup works just because you saved the page. Test it as a visitor would see it.

  1. Open the published page in a private or incognito browser window.
  2. Confirm that the public content remains visible.
  3. Check that the protected section displays the expected password prompt.
  4. Enter an incorrect password and confirm that the content stays locked.
  5. Enter the correct password and confirm that the protected content becomes accessible.
  6. If you configured an expiry date or usage limit, test that behavior too.

If the page uses a caching plugin or content delivery network, clear the relevant cache if the front-end result doesn’t reflect your changes. Then repeat the test.

How to Apply Partial Content Protection in Elementor and Beaver Builder

Password Protected Pro supports partial content protection with WordPress Block Editor, Elementor, and Beaver Builder. The exact editing steps differ by builder, but the goal remains the same: mark where protected content begins and ends.

Partial Content Protection in Elementor

In Elementor, you can use the Partial Content Protection widgets to mark the protected section.

  1. Edit the page or post in Elementor.
  2. Enable Partial Content Protection in the plugin settings.
  3. Add the Password Protected starting widget before the content you want to protect.
  4. Select the relevant password in the starting widget’s settings.
  5. Add the closing widget after the protected content.
  6. Save or update the page and test it on the front end.

Keep the protected content between the starting and closing widgets. If you want several protected sections to unlock together, configure the Dynamic ID settings as described in the Elementor password protection guide. Test this behavior on your own page before publishing.

Partial Content Protection in Beaver Builder

In Beaver Builder, you can use the supported Shortcode element to mark the protected section.

  1. Edit the page or post in Beaver Builder.
  2. Add a Shortcode element before the content you want to protect.
  3. Paste the generated opening shortcode into the element.
  4. Add another Shortcode element after the protected content.
  5. Enter [/password_protected] in the closing element.
  6. Save the layout and test the page in a separate browser session.

Keep the protected content between the two shortcode elements. If the protected section renders incorrectly, check the shortcode placement and review the official Partial Content Protection documentation for the latest Beaver Builder-specific instructions.

Common Partial Content Protection Problems and Fixes

If the protected section doesn’t behave as expected, check these common issues first.

1. The Shortcode Appears as Text

    Make sure you used the correct shortcode block or supported builder element. Copy the opening shortcode from the plugin instead of typing a password ID from memory.

    Also check for missing brackets, extra characters, or a shortcode pasted into a normal paragraph block.

    2. The Wrong Part of the Page Is Protected

      Review the shortcode placement. The opening shortcode must come before the content you want to restrict, and the closing shortcode must come after it.

      If the shortcodes surround too much or too little content, move them to the correct positions and update the page.

      3. The Password Does Not Unlock the Section

        Check that you copied the shortcode for the intended password and that the password remains active. Review its expiry date and usage limit, if configured.

        Then test again in a private browser window to avoid confusion caused by an existing session or cached page.

        4. The Page Builder Displays the Section Incorrectly

          Confirm that you used the supported widgets or shortcode elements for your builder. Save the layout, clear relevant caches, and test the front end again.

          If the issue continues, consult the plugin’s current documentation or contact support with the page builder name, plugin version, and a description of the behavior.

          5. The Download Link Is Hidden, but the File Still Opens Directly

            Hiding a download link inside a protected section does not automatically prove that the original uploaded file is inaccessible through its direct URL. Test the file URL separately if the file itself must remain private.

            For confidential files, use a file-access method that actually restricts direct access to the file, not just visibility of the link.

            Partial Content Protection vs. Full-Page Password Protection

            Choose the method based on how much of the content visitors should be able to see.

            RequirementBest fit
            Keep an introduction public and restrict a selected sectionPartial content protection
            Require a password before visitors can read the page’s main contentFull-page password protection
            Display a public preview with a private downloadPartial content protection, with direct file access checked separately
            Restrict access to a whole group of pages or a categoryA suitable page, post, category, or taxonomy protection method

            Partial content protection works best when public and restricted material need to coexist on one page. Full-page protection is simpler when the entire post or page should remain hidden until a visitor enters the password.

            Protect Partial WordPress Content with Password Protected Pro

            You don’t need to hide an entire WordPress page when only one section needs protection. Password Protected Pro lets you keep public content visible while restricting selected sections with a password.

            Enable Partial Content Protection, create a password, and place the generated shortcode around the content you want to restrict. Then test the page to confirm that visitors can access the public sections and unlock the protected content with the correct password.

            Ready to protect selected WordPress content? Get Password Protected Pro now and follow this guide to protect your content.

            Frequently Asked Questions

            Does WordPress support partial password protection by default?

            No. WordPress’s built-in password protection applies to the post or page’s main content. To password-protect a selected section, use a plugin that supports partial content protection.

            Can I use partial content protection with WordPress Block Editor and Elementor?

            Yes. Password Protected Pro supports native Block Editor, Elementor, and Beaver Builder. Follow the workflow for your chosen editor and test the result on the front end.

            Can I set an expiry date or usage limit for a partial content password?

            The plugin’s password management interface includes expiry and usage-limit settings. Configure these when creating the password and verify that the settings behave as expected for the protected section.

            Does partial content protection hide a file from anyone who knows its URL?

            Not necessarily. Protecting a section that contains a file link is different from restricting direct access to the uploaded file itself. Test the file URL separately and use a file-protection method if direct access must be blocked.

            Can I use a bypass link with partial content protection?

            No. Password Protected Pro’s Bypass URL option does not work with Partial Content Protection. Use the supported password-based workflow for this feature.