Content Hider

Restrict access to your content by wrapping it in a simple shortcode. You can grant access to certain roles or users who have a certain capability.

Author:Hassan Akhtar (profile at wordpress.org)
WordPress version required:2.5
WordPress version tested:3.8
Plugin version:0.1
Added to WordPress repository:18-01-2014
Last updated:18-01-2014
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:100
Rated by:4
Plugin URI:http://wpgurus.net/
Total downloads:2 365
Active installs:40+
plugin download
Click to start download

This light weight plugin can be used to hide posts and pages from specified user roles. All you have to do is wrap the target content in the shortcode [lock_content]. The plugin also adds a new button to the default WordPress editor so you can lock content quickly and effortlessly.

Features:

Custom error messages: You can specify the error message while hiding the content. Just add an error attribute to the shortcode. For instance:

[lock_content error="You need to log in first"]Some text[/lock_content]

Also, you can add a default error message in the control panel that will be displayed in case the error attribute of the shortcode is absent.

User levels: By specifying a role in the shortcode you can decide which members see the hidden content. For instance:

[lock_content role="author"]Text visible to authors, editors and admins[/lock_content]

You can also set a default access level in the control panel.

Capabilities: You can also block access by specifying a capability instead of a role. This may come in handy if you have custom roles on your website. Here's an example of this feature:

[lock_content capability="activate_plugins"]Text visible to admins[/lock_content]

If you like this plugin please give it a good rating.