Horje
Four roles to restrict user access on backend? - Wordpress Solution
[Solved] - Four roles to restrict user access on backend? - Wordpress Solution
Try following codes
Hi guys, I'm trying to achieve this, shouldn't be hard, right? 1) A role w/capabilities to publish/edit a custom post type (i.e. products), select themes and edit theme options. 2) Another role w/ same capabilities as (1) but they can also publish/edit POSTS. 3) Another role w/ same capabilities as (1) but they can also publish/edit PAGES. 4) Another role w/ same capabilities as (1) but they can also publish/edit PAGES AND POSTS. I need these restrictions to work as if a subscriber role would like to access http://...com/wp-admin/edit.php and WordPress would say: "You do not have sufficient permissions to access this page." I'd like this to be set with Roles so they can later on apply for a different Role with more priviliges and I can see from the backend who has X privilige.. Thanks! Joaquin BTW: It's a WPMS install, so I want users to have any of these roles, a regular plugin won't do the job.. /* Edit: Jan 17th */ Thanks for your replies guys. On WPMS each blog have their own wp_user_capabilities so I'm having a hard time doing what you suggest..

Solution - 1

You can create your self roles ! That's a very good solution [[LINK href="http://codex.wordpress.org/Function_Reference/add_role"]]http://codex.wordpress.org/Function_Reference/add_role[[/LINK]]


Solution - 2

Use [[LINK href="http://wordpress.org/extend/plugins/role-scoper/"]]WordPress Role Scoper[[/LINK]]


Solution - 3

Hi, Use this plugin http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin you can do the following with this plugin. * Edit Roles: Edit your user roles and their capabilities. * New Roles: Create new roles for use on your site. * Content Permissions: Adds a meta box on your write post/page editor that allows you to restrict content to specific roles. * Widgets: Adds a login form widget and user-listing widget that you can use in any widget area on your site. * Shortcodes: Creates shortcodes that you can use to restrict or allow access to certain parts of your posts and pages (or any other shortcode-capable area). * Template Tags: New functions for use within your WordPress theme for various things. * Private Blog: Allows you to create a private blog that can only be accessed by users that are logged in (redirects them to the login page).

BTW: It's a WPMS install, so I want users to have any of these roles, a regular plugin won't do the job..
If you are familiar with multi site installation, you should know that there is only one user table for all sites. User table does not duplicate for other sites. Look in your database table and you will see. Therefore, it the plugin work for single site, it will work for multi site installation. Thanks.

Date: 2022-10-21 05:17:33
Category: Wordpress
More for You