Skip to main content

Questions tagged [user-roles]

Names for a set of user capabilities.

Filter by
Sorted by
Tagged with
2 votes
0 answers
22 views

Any way to set user role permissions in the site editor?

Is there any way to set specific permissions in the site editor for user roles? I have a block theme and want to give editor roles the permissions to edit templates, but not to add or delete them. I ...
DoHu13's user avatar
  • 21
0 votes
2 answers
526 views

wp-admin/admin-ajax.php 400 Bad request (chrome console)

I have a download button (to download a pdf file) on my website page, underneath it, I have the number of times that this button was clicked, it is updated in real time using Ajax-JQuery WP method, ...
Sam94's user avatar
  • 13
0 votes
2 answers
33 views

Shortcode to show author role on the author archive page

I have an archive page to show each author domain.com/author. On the archive page for an author domain.com/author/john-doe I want to display few information like name, e-mail address and role like ...
Guillaume Sorel's user avatar
1 vote
0 answers
13 views

Frontend delete CPT post with custom role user

I am building a custom frontend where custom role members (created with User Role Editor) can add and edit spots. "Spots" are a custom post type registered like this: register_post_type('...
gl03's user avatar
  • 111
0 votes
1 answer
20 views

How to allow users in wordpress to switch between two assigned roles e.g. Candidate & Employer

I am using Careerfy Theme for wordpress which is basically a job board and has Candidate and Employer User roles set for new registrations. I want registered users to be able to switch between these ...
Job Hunt Community's user avatar
0 votes
0 answers
20 views

Show the author only own types of publications. (JetEngine, Elementor)

I created a custom post called Locations using Elementor + JetEngine. I also created a User Profile Builder Dashboard with the help of this, where the user (client) can add a location. But the problem ...
user239691's user avatar
0 votes
1 answer
50 views

Only an admin can add new tags

Hello, How can I restrict the addition of new tags for users who are not administrators in Posts -> Tags?
user59's user avatar
  • 1
0 votes
0 answers
16 views

Show different page depending on user role

I am quite new at WordPress and sitebuilding in general but I have built a site that I am pleased with. We are working with companies in four different countries and I want my customers to be able to ...
Knugen's user avatar
  • 1
0 votes
1 answer
28 views

Allowing a CPT post to be edited by a single user role

I am in the process of creating a form for a user to fill out to create a listing request which creates a CPT post and user record. In this process, I want to copy the subscriber role, rename it '...
php-b-grader's user avatar
1 vote
0 answers
11 views

Easiest way to create Reviewer Role: Can preview Drafts (and Private Pages) but not Edit them

This seems a bit of a hole in Wordpress Roles. I have a site with many cooks (Editors). I would like to give some of them read-only access to Draft and Private materials. This post goes a little way; ...
Chris Pink's user avatar
0 votes
0 answers
12 views

Hardening user's role after add_role

Using an instance of WP_User ($user) obtained via get_user_by(), I use $user->add_role('custom-role') to modify the user's role(s), then wp_update_user($user) to store the changed user in the ...
flymike's user avatar
  • 113
0 votes
1 answer
24 views

WordPress User Role Permissions For Custom Post Type

I'm trying to do some work on a custom post type for a specific user role. Basically, if the user is logged in as "Registered For Portal" then I would like that user to only see their own ...
Nick's user avatar
  • 1
0 votes
0 answers
20 views

Need some suggestions with Relationship fields and CPT/ACF

I am tasked with creating a Student/Teacher Portal where among other things, I need a way to build a way for Admins to assign Teacher with Students based upon Subject and Age group (Age for students). ...
RitZz's user avatar
  • 1
0 votes
1 answer
22 views

Custom post type needs to capability to create and edit by some specific user role

I made a custom post type called "Jobs" by ACF. I am using "Members" plugin to give users role. I want some users will get the capability to create post and edit post. others ...
arif hossain's user avatar
0 votes
2 answers
37 views

Non-super-admin users cannot access CPT even though I have explicitly added the capabilities to the user role

I've defined a CPT and any non-super admin user on any subsite cannot access it. I cannot figure out what is wrong with my code. CPT Definition: // Opportunities register_post_type( '...
grzybowski1911's user avatar
0 votes
0 answers
21 views

How to add default folders to Every registered User when registered in WordPress site?

I need some guidance on my work. As soon as the clients register on a WordPress site. I want the clients to see 4 folders by default: 2002 2003 2004 and Firm Documents. Once the clients activate their ...
zoe20's user avatar
  • 1
0 votes
0 answers
22 views

coauthors_plus_edit_authors to display metabox based on author caps

Need to display the coauthorplus metabox with author capabilities. On the documentation of the plugin they say its only with super admin and editor that the metabox is available. Any idea to add a ...
made leod's user avatar
0 votes
1 answer
27 views

Administrator user cannot access dashboard after localwp import

This is the 2nd time this has happened in the past few weeks so I thought I would try and get some ideas on how to overcome. There are a few others in the localwp community that have had the same ...
php-b-grader's user avatar
0 votes
0 answers
18 views

Condionally/limited emails from system (cantact-form, registration, passwd reset)With

With: add_filter( 'wp_mail_from', 'my_mail_from' ); function my_mail_from( $email ) { return "[email protected]"; } add_filter( 'wp_mail_from_name', 'my_mail_from_name' ); function ...
kornholio's user avatar
0 votes
0 answers
43 views

How to create Wordpress login for different users, with different roles?

I need to create a web page. where the user / group of users, after logging in through the portal (using the provided login credentials), will be redirected to the relevant page with their own ...
Irina Niko's user avatar
0 votes
1 answer
65 views

How to make my logged-in user-role shortcode displaying name instead of slug?

I am trying to get my frontend to show the role of a logged-in user via Shortcode. I have the Shortcode functional (see below) but it displays the slug and not the real name in the frontend. This is a ...
user235991's user avatar
0 votes
1 answer
113 views

Wordpress change role from administrator to author by itself (automatically)

do anybody know this kind of phenomenon? I do not have any user managing plugins installed in my WP, but after some interaction e.g. editing pages or creating postings (its not matter) WP changes for ...
RestAPPDev's user avatar
1 vote
1 answer
215 views

disable adding new tags on the edit and add post

I use the admin menu editor plugin. I have not allowed editors and authors to access the tags section But they can add a new tag in the post edit section This is not good for our site We want them to ...
Ali Kiani's user avatar
0 votes
0 answers
14 views

Custom User Role not working

I've created a custom user role that I want to only be able to access a CPT Job Listings Below is my code for the custom user role ( this is on a multisite network ) which I have added to my themes ...
grzybowski1911's user avatar
0 votes
0 answers
26 views

What is the difference between unmoderated and unapproved users?

I recently ran into these two user categories/roles on an existing site for a new client. Most of my client sites are more informational than transactional, so I'm guessing that the categories/roles ...
Nora McDougall-Collins's user avatar
0 votes
1 answer
193 views

How can I display customizer's "Additional CSS" to administrators and editors (in multisite)?

In my multi-site WordPress, administrators and editors don't see the Additional CSS section in the customizer. I would like them to have access to that panel. Only super-admins can see the additional ...
JakeParis's user avatar
  • 663
0 votes
0 answers
11 views

Limit the content cappabilities for user roles of subscriptions

I need guide to builld a subscription page payed by monthly having (bronce,silver,gold) subscriptions as a roles users. the bronce role can create and edit one an only (1 template page ) that page ...
piero.figeri's user avatar
0 votes
1 answer
87 views

Add another user role based on a defined input field in Wordpress (Woocommerce)

for a WooCommerce shop, the roles customer and corporate_customer are primarily used. As soon as a customer registers and enters a tax number in their billing address in the optional field (ID: ...
Johannes's user avatar
-1 votes
1 answer
279 views

Show only those pages that are created by the specific logged in user in WordPress

In WordPress, I created a new User role called "Customers" to only see the pages in the wp-admin Dashboard that only that role has created and not all the pages that are created by other ...
Programming Geek's user avatar
0 votes
1 answer
27 views

What is the correct way of validating running code when a particular role accesses a screen?

I'd like to run a series of actions if a particular role accesses a specific screen. For example, if( is_user_logged_in() && ! current_user_can( 'activate_plugins' ) ) { if( isset( $...
Ryan's user avatar
  • 53
2 votes
0 answers
42 views

How to protect content from public users and limit access to certain roles in WordPress 2023?

There are hundreds of content protection plugins and role managers, however in my current case I need a custom solution. The customer wants that only "logged in users" are to be able to read ...
Blackbam's user avatar
  • 545
0 votes
1 answer
86 views

Why is user_can_access_admin_page() an undefined function?

According to WordPress Developer Resources, the user_can_access_admin_page() function is still active and valid... https://developer.wordpress.org/reference/functions/user_can_access_admin_page/ ...
Lee's user avatar
  • 337
0 votes
0 answers
77 views

How to redirect non admin user after login

I have a custom user role on the site. I also have a login hook to redirect users to the home page. When an admin/editor logs in this works fine (although ultimately I would like them to redirect to ...
Michael's user avatar
  • 11
-1 votes
2 answers
87 views

Redirecting by role from a button

We have a button at the top of our site where users can quickly get their account information, but we need to redirect them to different pages based on their role. Is there code I can add to this ...
Julie George's user avatar
0 votes
1 answer
374 views

Block Gutenberg Editor manually by User Roles with a Filter with code

This is working perfectly for me but, is this an acceptable WP way to do it? Just trying to check that based on user role that the Gutenberg Editor blocked from showing up, like when creating a post, ...
fourwhitesocks's user avatar
0 votes
1 answer
285 views

Wordpress: New user role which is ONLY allowed to manage media

I would like to have a new user role (or restrict a role which is already available from Wordpress) which can only manage media (upload, delete pictures etc.) in the wordpress backend - every other ...
Lothar's user avatar
  • 3
0 votes
1 answer
148 views

How to add custom user role into wordpress

I added this code snippet to my function.php to create a user but after logging with this role I'm unable to edit the learndash course lessons quizzes... add_role( 'learndash_content_manager', '...
Masroof Ahmad's user avatar
1 vote
0 answers
71 views

How to create a User Role and give permission to only use Web Stories plugin?

I want to create a new user role "Story Maker" with only the "Google Web Stories" plugin shown in the dashboard for the user to create and publish stories. I don't want the user to ...
Frankie's user avatar
  • 11
3 votes
2 answers
1k views

Wordpress users roles wp-admin

A friend asked me to Review him wp page left unfinished by the company he contracted, I can't do a backup because on wp-admin page is no visible the settings although I am administrator, dos wp have ...
user14398375's user avatar
0 votes
0 answers
271 views

Get all users from role and add to dropdown (select) - wordpress, javascript

I have a shortcode from functions, which retrieves a list of all users from active role. I have managed to get the list into the dropdown list with a little trickery if I wrap a div around the users ...
Masterior's user avatar
0 votes
0 answers
68 views

if user role is x - show image - wordpress

I have set up a member portal with ultimate member where users can fill in and submit various forms and then see the answers in a list. Each submitted answer is automatically converted into a pdf. ...
Masterior's user avatar
1 vote
1 answer
35 views

Wordpress show content if current user get spesific role and spesific meta value

How to make conditional if statement like "Show content if current user get spesific role and spesific meta value", if not.. hide content <?php if( ( current user get spesific role and ...
Tuagapat Manam's user avatar
0 votes
1 answer
61 views

Send email to user if their role is changed to Author

I would like an email to be sent to the user when their role is changed to Author. The code below sends an email when a user's role is changed to any role, but I would like it only to send if the role ...
Sly's user avatar
  • 3
0 votes
1 answer
60 views

Display users by role

I am trying to display users by role, I am using the code below, but I am not sure if this code is correct.. but it works very well on the front page. <?php $args = array( 'role' => '...
Tuagapat Manam's user avatar
0 votes
0 answers
254 views

current_user_can() returning true for capability when the user and role do not have the capability

I've been trying to remove the "Customize" from the admin bar by removing the capability from the 'tt_editor' role by adding this to the bottom of the init action function: $editor = ...
Jerome Beckett's user avatar
0 votes
0 answers
79 views

Remove default wordpress roles

I'm creating a custom plugin that will add some custom roles to the standard one of wordpress. The roles are added without problems to wp, but I have some doubt. Can I remove the default roles of wp ...
devdev's user avatar
  • 1
0 votes
0 answers
119 views

Extend user search in the users.php page to allow for searching by role and excluding specified email domains from the "users search" input box

Update: A solution for this question was provided byt @t31os_ here Extend user search in the Wp backend area on the users.php page to allow for searching by email domain and role from the "users ...
Johnathan's user avatar
0 votes
1 answer
25 views

Can I remove WooCommerce specific product categories from shop managers?

Can I remove WooCommerce specific product categories from shop managers, so that they can publish products only in some specific categories. I tried this, but it's not working. $user = ...
Ricky's user avatar
  • 53
0 votes
1 answer
118 views

Remove_role not working, gives "Call to undefined method stdClass::remove_role()"

I'm making a special child theme template I'm going to use to match custom roles to a user's subscription. So, this is going to be for admin-only maintenance use. I made a function where I pass the ...
Galloway Grumblefield's user avatar
0 votes
0 answers
34 views

Show only users with the same role in Dashboard user list

I'm trying to see in the dashboard user list only the users with the same role of the logged in user. For example, i have Admin, Mod and Subscribers roles, when I'm a Subscriber i want to show only ...
Alex's user avatar
  • 1

1
2 3 4 5
28