Content Control – User Access Restriction Plugin

Mô tả

Content Control is a lightweight and powerful plugin that allows you to take complete control of your website’s content by restricting access to pages/posts to logged in users, specific user roles or to logged out users.

The plugin also enables you to restrict access to certain parts of a page/post using shortcodes e.g [content_control]Logged in content[/content_control]

Lastly, the plugin allows you to control the visibility of each sidebar/footer widget by selecting who can view each widget (everyone, logged out users, logged in users, specific user roles).

Full Feature List

Content Control allows you to do the following:

  • Restrict access to pages/posts to logged in/out users or specific user roles
  • Restrict access to media attachment pages, tags, categories, format to logged in/out users or specific user roles
  • Display a custom message to users who do not have permission to view the content
  • Redirect users who do not have permission to view the content to login page (redirects back to page/post after login), website homepage or custom URL
  • Display certain content on a page/post to logged in users only
  • Display certain content on a page/post to specific user roles
  • Display certain content on a page/post to logged out users
  • Apply custom CSS classes to on page content restriction shortcodes
  • Control the visibility of each sidebar/footer widget by selecting who can view each widget (everyone, logged out users, logged in users, specific user roles).

Note: Content Control restricts access to media at the content level via the media attachment pages. Content Control does not restrict access at the server level to actual media files (e.g.: .jpg, .gif, .pdf, and .webp files).

Shortcode

This example allows only logged-in subscribers and editors to see the text “Logged in content”.

[content_control roles=”subscriber,editor” class=”custom-css-class” message=”You don’t have access to this.”]Logged in content[/content_control]

If you are logged out or aren’t logged in as a subscriber or editor, you’ll see the “You don’t have access to this.” denial message.

All parameters are optional. If you add a parameter, make sure it’s followed by an equals (=) sign and the values of your parameters are inside double quotes (“”).

List of parameters:

  • roles – By default, all roles will have access to restricted content. If you want to give access only to specific roles, add this parameter with a comma-separated list of valid WordPress user roles wrapped by double quotes (“”). See the example above.
  • logged_out=”1″ – Only logged out visitors can see this content. If you want the opposite (only logged-in people can see the content), leave this parameter out. I.e., By default, Content Control restricts content so only logged-in visitors can view it.
  • class – Add the name of your custom CSS class if you want to add custom styles to your restricted content.
  • message – Your custom denial message if you want to override the default message from the plugin settings.

Created by Code Atlantic

Content Control is built by the Code Atlantic team. We create high-quality WordPress plugins that help you grow your WordPress sites.

Check out some of our most popular plugins:

  • Popup Maker – #1 Popup & Marketing Plugin for WordPress
  • User Menus – Show Or Hide Menu Items For Different Users

Requires WordPress 3.6 and PHP 5.3

Rate this post

Hãy bình luận đầu tiên

Để lại một phản hồi

Thư điện tử của bạn sẽ không được hiện thị công khai.


*