Questions tagged [wordpress-roles]

9 questions
6
votes
4 answers

WordPress user with custom role cannot view list page for custom post types without the "create_posts" capabililty

I am running a WordPress 5.2.3 site and having trouble with something in the admin panel. I have a custom role, let's call it librarian, and a custom post type, let's call it book. I want to make it so that a librarian can edit a book but not create…
Jamie Humphries
  • 3,368
  • 2
  • 18
  • 21
1
vote
1 answer

capabilty in WordPress to show menu to all registered users?

I am creating a plugin and adding menu in dashboard WordPress add_submenu_page('documents', 'Add Document', 'Add Document', 'manage_options','add_document', 'my_plugin_options3'); I also want to show that menu option to my registered users who are…
Sayed Mohd Ali
  • 2,156
  • 3
  • 12
  • 28
0
votes
1 answer

Wordpress Custom Post Type and Custom User Role

I'm creating a project's plugin that needs two CPTs and a custom role to manage only that two CPTs. Creating the CPTs was the simple part, but I'm stuck on creating a custom user role for a week. My CPTs are declared by: register_post_type("cpt1",…
0
votes
1 answer

wp_enqueue_script is not Working for Editor role

I have this code add_action('admin_enqueue_scripts', 'my_admin_scripts_method'); function my_admin_scripts_method() { wp_enqueue_script('admin-control2', plugin_dir_url( __FILE__ ) .'js/admin_control.js',array(), PLUGIN_VERSION, true);…
Crerem
  • 1,289
  • 2
  • 18
  • 45
0
votes
1 answer

How can a user have user role privileges that the user has in the sub-site, in which the user is member of?

e.g. a User John is registered from and is a member of "SITE A" in a multisite network, where his assigned role is "Charter Member". So, what I want is that when JOHN visits "SITE B" he has the privileges (i.e. I can get his role) as he has in "SITE…
0
votes
1 answer

Restrict custom post type by user Wordpress

Can any help me? I make the marketplace with a user role for example i call "seller" can sell his own music from dashboard. Then i have some problems and hope you can help me… How do i make limit/restrict data access to the select dropdown "Connect…
Proog
  • 1
  • 1
-1
votes
1 answer

Automatically replace members with an empty user role with another role

I want to move all members whose user role is empty to the default role. Is there a code about it?
-1
votes
1 answer

How to set the 'edit_published_posts' capability of a custom post type on false for a custom role ? Is it even possible?

I try to set up a custom role which has the ability to create posts of a specific custom post type only. This custom role should only be able to create a post, but not publish it. The publishing will be done by an Administrator. After the post is…
-1
votes
2 answers

Wordpress: How to allow some comment-actions (delete, edit...) only to specific roles?

Is it possible to customize Wordpress via action, hook or anything, that only users of role "administrator" or "editor" may trash, spam or edit comments from the backend? only users of role "administrator" or "editor" may trash, spam or edit…