Questions tagged [user-roles]

Names for a set of user capabilities.

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

Allow contributor user role to perform copy operation PHP

I have posted the issue on Stack Overflow but didn't get any solution. So now I am posting here. I want to allow contributor user role can copy file from one location to another location. I am using ...
0
votes
0answers
10 views

Wordpress - add_cap( 'edit_others_posts' ) for registered custom post types

I need to allow a certain custom user role (in this particular case, engineers) to be able to edit others posts within that custom post type. I'm trying to do this with add_cap( 'edit_others_posts' ) ...
1
vote
0answers
5 views

I want to submit multiple users if checkbox is checked

The following code is getting all terms and see if any one of them is checked or not. If any term is checked a form should show under the selected checkbox with email, the username(auto-generated) and ...
1
vote
4answers
47 views

Enable specific CSS Code for Visitors and specific Roles

how i can enable an specific css code for visitors and an specific user role for example this code: input[type=radio] { border: 1px solid !important; }
-2
votes
0answers
11 views

Filter Post in front end by using author ID

Am working on a car parts year/make/model/product/engine lookup WordPress site, what I want to achieve here is create a form where you can select year/make/model/product/engine and then you add them ...
0
votes
0answers
19 views

Easily adding multiple existing users to a multisite site

I manage a multisite network for a school. The sites are private (password protected), but users within the network should be allowed to access other sites as subscribers. (i.e. all students in a ...
0
votes
1answer
23 views

Assign user role by text field in Wordpress (Woocommerce)

I have a virtual store with woocommerce where I use the USER REGISTRATION plugin to register new customers. This plugin allows the creation of custom fields. I created a custom text field called "...
-2
votes
0answers
11 views

Please modify this code [duplicate]

I want this code to work only for Authors AND Contributors Please modify this code for me using if ( ! current_user_can //Hide Menu Options in Admin Section add_action('admin_menu','...
-1
votes
1answer
28 views

I want this code to work only for Authors AND Contributors

I want this code to work only for Authors AND Contributors Please modify this code for me using if ( ! current_user_can( 'manage_options' ) ) { //Hide Menu Options in Admin Section add_action('...
1
vote
0answers
12 views

Protect sequence of pages with same password for each of two groups of users

I'm currently creating a home page (learning environment) with wordpress. It should serve for an experimental study with two conditions. Based on the condition a participant will be assigned to, he or ...
0
votes
0answers
12 views

User Role Hierarchy for Product Visibility

How to establish Product Visibility Hierarchy in Woocommerce? I have created Custom User Roles, extending Author Role as Importer/Manufacturer, Distribuitor and Retailer. I have enabled Authors for ...
0
votes
0answers
12 views

Need help with woocommerce roles

i need help with woocommerce. The question is: How can i make a role for every user to see only his orders and not orders from other customers? Thanks
0
votes
0answers
36 views

Allow user to select role from front end edit profile form

I have a front end edit profile form working fine (thanks to previous answers) I'm having trouble adding a form element that lets the user change their role. I've tried adding: ...
0
votes
0answers
16 views

Allow user select role in wordpress default registration without plugin

How do I allow user select role, like 'Contributor' and 'Subscriber' In Default Wordpress Registration Page Without Plugin
0
votes
3answers
44 views

(solved) getting post author's user role

we can use $user = wp_get_current_user(); if ( !in_array( 'administrator', (array) $user->roles ) ) to get the user role of the viewer. but i want to ignore who views. i want to get who writes ...
0
votes
0answers
8 views

Hide pages specific user can't edit

I am using roles to allow specific users to edit pages. When a user is logged in and clicks the pages menu they are only allowed to edit those specified by their role. However, all of the pages on the ...
0
votes
0answers
9 views

User roles established by site entry URL/cookie possible?

I have a use case to present different content and products to different, casual visitors of the general public WITHOUT them first creating an account or needing to login (if returning), preferably ...
0
votes
0answers
59 views

wp_before_admin_bar_render never called in front end

For some reasons, if a user is logged in and does not have administrator role, The toolbar does not displayed. I added this code : add_action( 'wp_before_admin_bar_render', array( '...
0
votes
0answers
33 views

PHP Notice: Trying to get property 'roles' of non-object in functions.php

I am checking to see if a user belongs to a certain group and therefore gets tax exempt. I am not sure why this function below is causing php notice. Any clues? [02-Dec-2020 05:04:20 UTC] PHP Notice: ...
0
votes
0answers
13 views

how to create a user rule that can only manage support tickets?

I want to add a user rule so users with that rule can only receive and respond to "support tickets", nothing more. what code should i put in my site?
0
votes
1answer
20 views

How to make WordPress 'editor' role to list/view/add/edit users only with the role 'author'?

I have added some extra capabilities to the existing 'editor' role in wordpress with: function add_uedit_caps() { $role = get_role('editor'); $role->add_cap('create_users'); $role->...
0
votes
0answers
27 views

current_user_can( 'edit_user' ) does not work

I don´t clearly understand why this code does not work : //Front-end profile page global $current_user; if ( current_user_can( 'edit_user') ) { ... } $current_user output : ["allcaps"]=> ...
0
votes
0answers
25 views

Language per user role, how can I achieve this?

I have a multisite with Buddypress intended for two languages. Therefore I have translation files for each language, and this for the theme and for the plugins (nl_NL , fr_FR) in the folders ...
0
votes
0answers
7 views

How to hide Add new Term area for taxonomy terms for specific role (Client)

I have a taxonomy "page type" i want to hide the "Add New Page Type" side for the user with role Client actually i want that user with role client won't be able to add new terms, ...
0
votes
1answer
14 views

How to make WP page accessile only to specific user roles

I am creating a website that consists of a "Home Page" (public) that has a login link to the WP login page, then, there will be different pages that are only accessible to specific logged ...
1
vote
1answer
29 views

Custom roles can't access to wp-admin

i'm trying to create a custom role, very similar to admin but without the capabilities to edit/delete plugins. Since i don't wont to use plugin for that i've edited the functions.php file adding ...
1
vote
0answers
29 views

WP_Query with meta_query for children

I'm using WooCommerce and it has a lot of plugins to handle different stuff. The one thing needed by the client that no other plugin manages correctly is which variations can be visible for each user ...
0
votes
0answers
6 views

looking for example how to incorperate roles in custom plugin

I am looking for an Howto/example on User roles in Wordpress. For example I want users to be able to login to the wp-admin site, but only be able to access my custom plugin menus/pages. Nothing else, ...
0
votes
1answer
31 views

Separate user bases or hide users of another role or connected to another minisite

I am creating a WordPress site in which I want to create mini-sites/sub-sites meaning each of them has their own separate user base. Alternatively, it's ok that all the users are in the same base, but ...
0
votes
1answer
17 views

Admin users not able to see network menus

I am new to wordpress, and I am an admin in my site. But I can't see the network menu, SuperAdmins can. Any idea why? I am using the user role editor plugin to manage roles. But I haven;t changed any ...
0
votes
0answers
22 views

Different comments section for different user roles

I have website. in this website people can post complaints about customer satisfaction of companies. Company and complainer (who is author of this complaint post ) can do discussion under post. so i ...
0
votes
1answer
24 views

Conditional editing CPT - using editor's role and author's usermeta

I have created a custom post type. Each author is attributed to a editor group when her/his account is created. This is save on the author's user meta I created two roles with administrator ...
0
votes
0answers
14 views

Wordpress user role uploaded images to a specific folder

I need a method to the specific user role images (e.g. author) upload to other media library (e.g. "wp-content/uloads/authors/"), not the original "wp-content/uploads/year/months...&...
0
votes
1answer
21 views

Remove add post for user role

I add new role with WP Members, I also use Publishpress and user role editor For my new role, I want to disable the capability to create posts (built-in not custom post), not only with CSS but the ...
0
votes
0answers
13 views

WooCommerce limited role

I'm trying to make a custom Woocommerce role that only has access to the WooCommerce reports. The role needs to be able to see the sales reports, but not edit products or anything else on the website. ...
0
votes
0answers
18 views

How to only display all posts to a custom User Role?

I have a custom user role and I want to display all custom website posts to them, without letting them edit/delete them. Right now the custom post doesn't show up in their dashboard. I know it will ...
1
vote
1answer
27 views

Why is my Custom Post Type not showing up after adding capabilities?

I'm trying to add a custom post types with capabilities, so a custom user role can do certain things with them. Eventually the custom role is a Client, and the post a Website, and I want clients to be ...
1
vote
0answers
12 views

Set different custom menu items for different user roles

I have added some custom menu using add-menu_page and it is working perfectly with the default administrator admin bar. But when I log in to different user roles, they are not showing. My question is ...
0
votes
0answers
21 views

Hide payment method based on user role AND minimum cart value

Around April this year, we have to move our business 100% online due to the pandemic. Physical store hardly get one customer per day. after 5 months, we recognizes pattern; almost all failed COD ...
0
votes
0answers
14 views

Change user's posts to draft upon user role change

I want to change a user's posts (in a custom post type) from published to draft upon a change in their user role. Anyone know how I can do that programmatically?
0
votes
0answers
36 views

How to hide “Change role to” dropdown on Users admin menu

How can I hide the "Change role to" dropdown?
0
votes
0answers
11 views

Need help with Task assigning and rewarding as currency which withdrawable

I have created custom roles and registration forms by using ultimate member plugin. Mr. Y Mr. X I've assigned Mr. Y to my purchasable services (I am using ez form calculator plugin for this). Now ...
1
vote
1answer
23 views

Custom post type - no layout section of Document tab, and no author choice

A portion of my website is used by another non-profit organization. In order to restrict them from editing/deleting at large, I created a custom post type for them, and added a user role to go with ...
0
votes
0answers
6 views

I cannot view users added products on the author page

I would like to consult you a question I cannot find the answer to. I am developing a website that uses Wordpress. A user in the agent role adds a product. I cannot view user added products at www....
1
vote
2answers
31 views

Show metabox for a special role

I have special roles on my site. I use easy digital download. My user has access to the download page. I want the metabox not to see the number of sales. Can I hide this metabox for this role or user? ...
0
votes
0answers
9 views

Roles and User editing

I have a woo-commerce site that has Customers, Store Vendors and Store Managers. Store vendors are able to use a particular page on the website to submit a product as draft to be reviewed and ...
1
vote
1answer
10 views

Hiding div based on user role

I am running the following snippet on my wordpress site to display an image. I would like to hide this div if the user role is "wholesale" (a custom role I created). Is this possible? ...
0
votes
0answers
19 views

WooCommerce custom role not working

I am trying to add WooCommerce product adding/editing capabilities to the Yoast SEO Manager role, however all it does is add the WooCommerce menu icon to that user role, and not the products tab, so ...
0
votes
2answers
42 views

check the first login for specific roles

Based on this answer i created a small functionality for users that are logging in for the first 3 times to make some elements classes use css animation. What i am trying to do is to adjust this code ...
0
votes
1answer
14 views

Add User Role: Pre-saved in User-Meta [SOLVED]

I am adding an action after user registration to add another user role based off the users meta_value. When I use: add_action('um_after_save_registration_details', 'custom_after_new_user_register', 10,...

1
2 3 4 5
26