WP Private – Gated Content for Posts & Pages
Hide part of a post or page from logged-out visitors and show a login form or login link in its place.
Install in
Sometimes most of a post is for everyone and one part is for people with an account: the meeting minutes, the download link, the second half of the article.
Wrap that part in [protected] and [/protected]. Logged-out visitors see a login form, or a login link, exactly where the hidden part would be. After logging in they are returned to the same post and see everything.
What it does
- Hides any part of a post or page from logged-out visitors. Use it as many times as you like on one page.
- Shows a login form, a login and register link, or nothing in place of the hidden part.
- Lets you write the text shown around the login prompt.
- Lets you exclude individual users even when they are logged in.
- Works on activation. Settings are optional.
What it does not do
WP Private gates part of a post. It is not a membership suite with levels and billing, and it does not protect files.
What is protected
- The post or page itself: Yes
- Blog, archive and home page listings: Yes
- Automatic excerpts: Yes
- RSS and Atom feeds: Yes
- REST API rendered content: Yes
- Site search: No. A search for a word that appears only in the hidden part still returns the post, without showing the hidden text. A fix is planned for a later release.
- Other plugins that read raw post content, such as some SEO, search or AI tools: Not controlled by this plugin. Check each one.
- Users who can edit the post: They always see the full content in the editor.
- If the plugin is deactivated or deleted: The shortcode stops working and the hidden text becomes visible together with the shortcode tags.
Privacy
WP Private stores its settings and a list of excluded user IDs in your site’s database. It sets no cookies of its own, loads no scripts or styles on your pages, and contacts no external server. If you delete the plugin, these settings stay in the database (see the FAQ for the list).
Written by Joobi from the project's own listing. See the source page
2.0.0
A maintenance release after a long gap. The login form now appears inside the post where the hidden part is. Protected content works immediately after activation. Login links return you to the post. Settings are sanitised. Requires WordPress 6.8 and PHP 7.4. Your [protected] shortcodes are unchanged and your settings are moved to a new format automatically; going back to 1.6.1 afterwards is not supported.
Follow this listing's changes (Atom feed)