WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Private Content

Display a portion of a post content only to users of a specific role.

Is there a way to display an alternate text to readers that haven't the rights to read the hidden text?

This plugin is not intended to be used in such way, but only in order to display a portion of a post to certain readers. Also, the hidden text must remain hidden, without the presence of an alternate text that could reveal the presence of the hidden text. Anyway, as of version 2.2, the plugin can display an alternate text, if it's necessary: you can use the alt option to do that.

Also, this plugin was created only to show a small piece of text (i.e. a couple of lines) as a note to the post for particular readers.

If you need to show the entire post only to certain readers (i.e. readers who pay to read a post), you can use a plugin like Members.

The hidden text is similar to the public text. Is it possible to stylize it in a different look?

Yes, you have to edit the CSS file of your current theme. The shortcode generates a <p> HTML tag with at most three classes in this order:

  • private to stylize all private contents
  • [role]-content to stylize the content for that specific [role].
  • [role]-content-only to stylize the content for that specific [role] only.

Requires: 3.0 or higher
Compatible up to: 3.9.1
Last Updated: 2014-4-16
Downloads: 6,315

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1 100,2,2 100,1,1
100,1,1
100,1,1