This plugin helps you to hide certain parts of your content like a paragraph or an image etc. to logged-out users or users of any other role with just a simple shortcode.
Customize the shortcode in order to display a special note to your users, apply custom CSS classes for your own design or hide the restricted parts completely.
- text within shortcode
[member][/member]is not visible to anonymous users
- hide content based on user roles (subscriber, contributor, author, editor, admin)
- restricted text can be replaced with info text box
- info text can be customized
- comes with a handy TinyMCE button for quick access
- Upload the plugin files to the
/wp-content/plugins/restrict-anonymous-accessdirectory, or install the plugin through the WordPress plugins screen directly.
- Activate the plugin through the ‘Plugins’ screen in WordPress.
- Use the shortcode
[member][/member]in any post, page or custom post type in order to hide content from anonymous users. Important: Please use “Classic” block element if you are using Gutenberg.
- Optional parameters are
showinfo="0"to hide the info message,
infotext="Your custom info for anons."and
class="my-custom-css-class"for adding CSS class to the info box.
- Use parameter
role="editor"to hide content from users below editor capabilities.
Contributors & Developers
“Restrict Anonymous Access” is open source software. The following people have contributed to this plugin.Contributors
Translate “Restrict Anonymous Access” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
- Added compatibility to custom user roles.
- Added HTML support for infotext parameter.
- Added optional user role based content restriction.
- Tested with WordPress 4.8.
- Fixed: Text output with paragraph tag (wpautop).
- Initial release for WordPress plugin directory.