Restrict content and contexts to control what your users get exclusive access to, or drip content over time. Create an unlimited number of Access Levels and override user and role capabilities.
Use this plugin to quickly set up a membership site where your users can get different levels such as Gold, Silver and Bronze. Then, restrict access to e.g. posts tagged “Premium”, articles written by specific authors, or all your free products.
No coding required.
Unlimited Access Levels
- Multiple levels per user
- Synchronization with User Roles
- Set durations and let them expire
- Manage capabilities
- Redirect unauthorized users to a custom page
- Tease content for unauthorized users and show custom message
- Shortcode to fine-tune restrictions in your posts or pages
Unlimited Level Restrictions
- Nav menu items
- [NEW] Sidebars in Content Aware Sidebars
Conditionally restrict and drip content:
- Singulars, eg. posts or pages
- Custom Post Types
- Singulars with given taxonomies, eg. categories, tags or post formats
- Singulars by a given author
- Page Templates
- Post Type Archives
- Author Archives
- (Custom) Taxonomy Archives
- Date Archives
- Search Results
- 404 Not Found Page
- Front Page
- bbPress User Profiles
- BuddyPress Member Pages
- Languages (qTranslate, Polylang, Transposh, WPML)
- Pods Pages
Combine conditions in any way you like, e.g. restrict posts in Category X by author Y.
Negate conditions, e.g. restrict all pages except Page X.
Integrated Support for Popular Plugins
- bbPress (v2.5+)
- BuddyPress (v2.6+)
- qTranslate X (v126.96.36.199+)
- Pods (v2.6+)
- Polylang (v1.7+)
- Transposh Translation Filter (v0.9.5+)
- WPML Multilingual Blog/CMS (v2.4.3+) Tested and certified
[restrict role="editor" page="1"] This content can only be seen by editors. Other users will see content from Page 1. [/restrict] [restrict level="platinum"] This content can only be seen by users with Platinum level or above. [/restrict] [login-form]
API for Developers
rua_get_user_roles($user_id:int):array rua_get_user_levels($user_id:int,$hierarchical:bool,$synced_roles:bool,$include_expired:bool):array rua_get_user_level_start($user_id:int,$level_id:int):int rua_get_user_level_expiry($user_id:int,$level_id:int):int rua_is_user_level_expired($user_id:int,$level_id:int):bool rua_has_user_level($user_id:int,$level_id:int):bool rua_add_user_level($user_id:int,$level_id:int):int|bool rua_remove_user_level($user_id:int,$level_id:int):bool rua_get_level_by_name($name:string):int rua_get_level_caps($name:string,$hierarchical:bool):array
For more information
- Upload the full plugin directory to your
/wp-content/plugins/directory or install the plugin through
Pluginsin the administration
- Activate the plugin through
Pluginsin the administration
- Have fun creating your first Access Level under the menu User Access > Access Levels > Add New
- How do I restrict some content?
- Go to User Access > Access Levels > Add New
- Click on the “Select content type” dropdown to add a condition
- Click on the created input field and select the content you want to restrict.
- To the right you can choose to sync the level with a User Role. All users with the selected role will then get this level. Otherwise, add the level to each user individually under the Members tab or in their profile
- For unauthorized users, choose whether to redirect to another page or to show the content from another page along with a teaser/excerpt from the restricted content
- Give your new level a descriptive title and save it
In order to restrict a context, e.g. “All Posts with Category X”, simply select a new type of content from the dropdown below the and label and repeat Step 3.
You can choose to negate conditions, meaning that if you negate the group “All posts with Category X”, the level will get exclusive access to all content but that
- How do I make an Access Level extend/inherit another level?
Let us say you have two Access Levels, Gold and Silver. You want your users with the Gold level to be able to see content for the Silver level too.
- Go to User Access > Access Levels > Edit the Gold level
- To the right on this screen there is a Extend setting
- Choose the Silver level as Extend and click Update
Your Gold level now inherits all the conditions from your Silver level. You can create as many hierarchical levels as you want, e.g. Bronze -> Silver -> Gold -> Platinum.
Capabilities are also inherited.
- I added a Level to a user, but it can still see other content?
When you create an Access Level to restrict some content, only users with this level will be able to see that content, but they will also be able to see all other (unrestricted) content on your site.
A quick way to “lock down” and make sure e.g. only Administrators can see all content is to create a new Access Level for Administrators with a negated condition group containing “404 Page”. This means that normal users only can see the 404 Page.
By default, Administrators will have access to all content regardless of your levels.
- Restricted content is still being displayed on archive pages or in widgets?
Restrict User Access does currently not support hiding single items from archive pages, search results, widgets or custom lists.
It is recommended only to show titles and excerpts in these cases.
A simple and FREE plugin that does the job! No paid add-ons to unlock features.
Plugin does exactly as it’s name suggests and is extremely easy to use. If you were to struggle with something the developer responds relatively fast to support topics on the forum. (posted an issue with a new wordpress version myself)
I know someone else posted a negative review saying this plugin is confusing to use but don’t let people like this mislead you. As simplistic as this plugin is I seriously question people like this as I was able to configure everything without even going through the installation instructions. And for the record this is my first wordpress site.
Works really well for various uses!
I was looking for a plugin with custom user access levels, and this one is the best I’ve found, it works great, and it’s easy to configure !
As title says – allowed user to still change themes etc but just threw up errors after that user tried to access those restricted areas.
Had to change plugin name to force deactivate and then manually delete it to regain control.
Contributors & Developers
“Restrict User Access” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Added: autosave conditions
- Added: wp filter to add condition metadata
- Added: wp action to add condition actions
- Added: simplify option to autoselect conditions
- Added: ui improvements
- Fixed: type warning on capabilities
- Fixed: adding multiple members to level at once
- Added: ability to restrict all buddypress profile sections
- Added: exposure moved to condition groups, now called singulars or archives
- Added: get level capabilities in the API (props Jory Hogeveen)
- Added: wordpress 4.7 support
- Added: now requires at least wordpress 3.9
- Fixed: improved restriction editor UI
- Fixed: improved search when adding members to level
- Fixed: better compatibility with other plugins using nav menu editor (props Jory Hogeveen)
- Added: more compatibility with plugins adding unneeded scripts
- Fixed: extended capabilities could in rare cases cause white screen
- Added: counter-measure against plugins that add buggy scripts
- Fixed: decoding of taxonomy term names in conditions
- Fixed: order of content in conditions dropdowns
- Fixed: compatibility for wp versions older than 4.0
- Added: select2 dropdowns updated to 4.0.3
- Added: select2 dropdown styles more robust to external changes
- Fixed: dropdowns on user profile, nav menus, members tab
- Added: performance improvements
- Added: set visibility per level in content aware sidebars
- Added: drastically reduced database queries when checking taxonomies
- Added: support for buddypress 2.6 members
- Added: infinite scroll for content in level conditions editor
- Added: select2 dropdown styles more robust to external changes
- Added: dialog on unsaved changes in level conditions editor
- Added: wordpress 4.6 support
- Fixed: woocommerce order page inaccessible for users
- Fixed: option to select all authors and bbpress profiles
- Fixed: improved level conditions editor ux
- Added: remove foreign metadata on level deletion
- Added: use caching when getting user levels synced with role
- Fixed: add guard for plugins using wp_edit_nav_menu_walker filter wrong
- Fixed: levels synced with role selectable in user profile
- Added: restrict nav menu items to access levels
- Added: capability column and small improvements in level overview
- Added: easier to manage levels in user profile
- Removed: date column in level overview
- Fixed: admin toolbar could be hidden for admins and displayed when not logged in
- Added: access level pages moved to new menu
- Added: settings page
- Added: option to hide admin toolbar
- Added: option to add level on new user
- Added: api to add and remove user level
- Added: pods pages module, props @sc0ttkclark @herold
- Fixed: auth redirection would in rare cases not work
- Fixed: better compat when other themes or plugins load breaking scripts
- Fixed: condition logic ui improvements
- Fixed: api should be loaded everywhere
- Added: login-form shortcode
- Added: user search input stays open on select
- Added: api to get user roles, user levels, user level start, user level expiry, is user level expired, has user level and get level by name
- Fixed: expiry bug when level had no duration
- Fixed: searching users for level
- Fixed: user search input would in some cases not work
- Added: level capability manager
- Added: level editor tabs moved under title
- Fixed: level members pagination
- Fixed: performance improvements
- Added: completely rewritten level condition ui
- Added: qtranslate x module
- Added: ability to drip content
- Fixed: bug making attachments not selectable
- Fixed: bumped versions for integrated plugins
- Fixed: bug when saving user profile
- Removed: qtranslate module
- Added: ability to add members from members screen
- Added: show level name in overview
- Added: filter for global access
- Added: admins will have global access by default
- Added: level parameter for restrict shortcode
- Added: email link in members list
- Added: expired levels included in user list
- Fixed: hierarchical and synced levels for logged-out users
- Fixed: fix expiry check when getting levels
- Fixed: pagination in members list
- Fixed: levels with members can be saved properly
- Fixed: duration hidden for synced levels
- Added: level durations
- Added: users can have more than one level
- Added: levels synced with roles now visible in user list
- Added: ability to remove and bulk remove users in level members list
- Added: status column in level members list
- Fixed: levels synced with roles did not work properly hierarchically
- Fixed: some array used php5.4+ syntax
- Fixed: removed warning for missing parameter in action hook
- Fixed: compatible with wp4.4
- Added: allow list of roles in shortcode
- Added: show number of members in level overview
- Added: list of members in level editor
- Added: draft post status included in post type lists
- Fixed: posts page and front page excluded from page post type list
- Fixed: gui improvements in level editor
- Fixed: corrected the way user level dates are stored
- Fixed: renamed old restriction strings
- Added: wp4.3 compatibility
- Added: links to support and faq
- Fixed: remove warning when no levels exist
- Fixed: correct link to review page
- Fixed: access level manager now requires edit_users capability
- Fixed: users without edit_users capability cannot control their own level
- Added: restrictions renamed to access levels
- Added: hierarchical level functionality
- Added: levels can be given to individual users or synchronized with roles
- Added: non-synced levels are displayed in users overview screen
- Fixed: content would not be restricted properly if two access levels had overlapping conditions for different roles
- Fixed: actions and filters got new namespaces
- Fixed: restrictions not working properly for non-logged in users
- Fixed: if metadata value was 0, default value would be displayed instead
- Fixed: check if admin column key exists before trying to display metadata
- Added: ability to select non-logged in user in restriction manager
- Fixed: in some cases content could not be removed from condition group
- Fixed: pagination and search for post types in restriction manager
- Fixed: some code needed php5.3+
- First stable release