This plugin will gives the site admin the ability to “blacklist” roles (subscriber, contributor, author, and/or editor) and will redirect all users assiged to any blacklisted roles when they try to access any wp-admin page (is_admin() is true). This plugin will also hide the admin bar for those users in WordPress 3.1+.
Admin users and any users belonging to any of the other WordPress roles that have not been blacklisted will continue to see and have access to the other sections of the WordPress admin that correspond to their role’s capabilities.
Note: Version 1.0.0+ requires a minimum of WordPress 3.1. If you are running a version less than that, please upgrade your WordPress install before installing or upgrading.
Support is provided at: https://wordpress.org/support/plugin/wp-admin-no-show
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Q. Why whould I need to block admin/profile from a user?
WP Admin No Show was originally written for a WordPress site that used 3rd party authentication and used none of the normal WordPress admin pages, including profile.php.
Does exactly what it’s supposed to – very well done.
Simply does what it’s supposed to do. Thanks!
It works perfectly.
Does exactly what I needed, simply and efficiently.
It seems strange enough that this functionality was not included in woocommerce itself. However no editing funtions.php with code snippet to do this and neither other plugins worked for me, except of this plugin. So happy to finally have gotten over this problem, which looks so easy at first and was a pain to be solved.
Contributors & Developers
“WP Admin No Show” is open source software. The following people have contributed to this plugin.Contributors
- Added whitelist setting. This is currently only for site administrator for cases where adminstrator may also have a secondary role that is blacklisted. This may be expanded to allow all roles to be whitelisted.
- Updated “Tested up to.”
- Tested with WordPress 4.4.1.
- Add filter to allow hooking into the $redirect value. (Thanks @cloughit!)
- Use admin_init hook for wp_admin_no_show_admin_redirect() to prevent temporary view of admin page on redirect.
- Added check for ‘DOING_AJAX’ when checking is_admin() on redirect to prevent conflicts with other plugins.
- Switched back to admin_head for wp_admin_no_show_admin_redirect() to to conflit with Woo Commerce.
- Use admin_init hook for function wp_admin_no_show_admin_redirect()
- Tested with WordPress 4.2.2.
- Updated copyright year.
- Updated “Tested up to” header.
- Tested with WordPress 4.0.1.
- Updated verbage in admin page.
- Updated copyright year.
- Removed improper use of current_user_can(“role”) function with WordPress Check User Role Function (AppThemes). Thanks to @massimopadovan for pointing it out.
- Tested for WordPress 3.8 compatibility.
- Updated readme.
- Update screenshot.
- Added section labels to plugin options page.
- Tested for WordPress 3.7 compatibility.
- Tested for WordPress 3.6 compatibility.
- Tested for WordPress 3.5 compatibility.
- Removed administrator role/checkbox from blacklist.
- Whitelist multisite super admin. (thanks to rangiesrule for the request)
- Fixed bug in logic preventing regular admin from redirecting.
- Replaced multi-select dropdown with checkboxes.
- Updated multi-select dropdown to allow toggling of option items.
- Removed 28px white space in front end when admin bar is disabled.
- Thanks to Max Bond for pointing out the problem and Samuel Aguilera for the fix.
- Added ability to choose which page to redirect to or not at all.
- Added admin page and ability to blacklist user role.
- Initial release.