While WordPress enables you to password protect a post, it does not allow for any default privacy for your logged in guests. This plugin will allow you to mark certain posts as ‘private’ so that any visitor will have to be logged in to view the page. There are also options to allow the post not to appear at all on category listings if the visitor is not authenticated.

Supporting configuration

You need to add a page to your current theme. Create an empty file called 'comments_private.php' in the theme root. this file will be loaded in the event of a post having comments and the post being secure. You can put text in here if you want, but there is no real need.

Plug-in installation and activation

First, you should review the supporting configuration section above.

Unzip the plug-in into your wp-content/plugins directory. In your plug-ins admin panel you should enable the plug-in. Once enabled, you should see a "Configure" option on the plugin.

Parameter explanation

The following section outlines the parameters used in the plug-in.

Hide content
This is basically the prime reason why you would have this plugin, hoewever you may just want to not list entries in the categories. Untiking this will allow a non-authenticated user to view the page if they have a link to it.

Hide listing
Generally you might want to just list and indicate that a page is protected - possibly as a teaser - but still protect the actual content. Ticking this setting will remove the enty from the category list, so a non-logged in visitor will never see it.
NOTE: if you do not tick this feature, you really should use the post excerpt (if your theme supports it) or at the very least use the More… tag so the whole post does not appear in the category listing.

Default to private
Is the content on your site mostly private, then instead of having to worry to go tick the option each time, set this and all posts will default to private.

Replace text
Ths is the text that will replace a post if a user browses to the page. Full html is supported and only a short message should really be used.

Release history

Version 1.0 (May 16, 2006)
Initial release.

Version 1.1 (May 21, 2006)
Removed the $post->is_private indicator.
Added nkprivate_is_private() function instead.

Version 1.2 (September 24, 2006)
#24 Control panel layed out better and more consistently with other NK plugins.
#25 Slashes no longer a problem with quotes and slashes in the test.

Download

Latest version (.zip)
Latest version (.tgz)