Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
0 votes
0 answers
38 views

Wordpress 6.7 - You are not allowed to list users during API call

I am trying to get a list of all users (not just authors). I have the below script in Codeigniter 4: class WPUserModel extends Model { protected $wordpressApiUrl = 'https://blog.example.com/wp-...
spreaderman's user avatar
1 vote
0 answers
21 views

Removing user removes user meta?

Sorry for the basic question, but I couldn't find an answer by reading the docs. When we delete user in the WP admin area, will WP delete the associated user_meta too?
Life after Guest's user avatar
0 votes
2 answers
1k views

WordPress user password reset not working

I have additional users set up on my WordPress site. One of the other users has asked me to reset their password as the 'forgot my password' function doesn't work (a reset password email isn't ...
MartyB's user avatar
  • 1
2 votes
1 answer
135 views

Redirect Login Based on User Role

I'm currently using the following code to add a login form to a page. How can I redirect users after they have logged in based on a custom user role. function my_login_form() { $args = array( ...
Jon's user avatar
  • 325
0 votes
1 answer
29 views

Default Usermeta Entries for every newly created user?

we have a Buddyboss page running with 30k users. Our usermeta Table is growing fast because of a few plugins we use which all seem to write a lot of settings to it. I try to remove as many obsolete or ...
tim's user avatar
  • 164
0 votes
1 answer
35 views

Force Profile link for username, and stop "Website" field on Profile from becoming offsite link atop Comments, in "Recent Comments" list, etc

I've noticed that if "Website" is filled in on a user's Profile page, then the link formed around the username of that user will often (not always) point to that offsite link instead of to ...
S. McCandlish's user avatar
0 votes
1 answer
53 views

Can a user submit requests to wp-admin/admin.php without logging in?

I have a site that has a malicious link being injected into it which causes every page of the site to be clickable and go to random sites. The script is being injected through the WPCode plugin which ...
Timothy Fisher's user avatar
167 votes
6 answers
427k views

If the current user is an administrator or editor

How can I check to see if the current logged-in user is an administrator or an editor? I know how to do each individually: <?php if(current_user_can('editor')) { ?> <!-- Stuff here for ...
andy's user avatar
  • 2,359
1 vote
2 answers
827 views

Users as team members through a loop in elementor

I am trying to create a loop in Elementor's theme builder that will display each user with the role of the Contributor or Author. I.E. When the admin of the website will add a new user with the above ...
Andrei Dombrov's user avatar
0 votes
1 answer
98 views

How to allow Contributors to edit their own posts, whilst still needing to be reviewed by an admin?

Im using the User Role Editor plugin to try to acheive this, but I've also tried PublishPress Capabilities and had the exact same problem. I'd like it so that my contributor users work like so: Their ...
user303096's user avatar
0 votes
2 answers
414 views

Add Additional Column in "Users" Dashboard Area - BP Extended Profiles (WordPress)

I have a site with extended profile fields. I can't find the particular way of adding an additional column as: Username | Name | Email | Site Role | Discord (this is the additional column) The ...
Shoaib Qazi's user avatar
0 votes
1 answer
58 views

How to use 2 different databases but share the same user in wordpress

I have 2 wordpress websites on the same server, one is bloo.com and the other is forum.bloo.com. each site has its own database, they have their own wp_content, each has its own file separately, but I ...
Mike's user avatar
  • 1
1 vote
0 answers
145 views

How to "attribute all content to" specific user once delete user in wordpress

I have a question about how to attribute all content to specific user once delete any user in Wordpress. Is there any idea how could I disable "Delete all content" option and set as default ...
lampros stasinos's user avatar
104 votes
8 answers
283k views

How to check if a user is in a specific role?

I have a pretty specific requirement to show different text in a field label on the user profile page based on the current user's role. I can't seem to figure out how to check whether the current use ...
jessegavin's user avatar
  • 3,466
0 votes
1 answer
71 views

Is there a way to resend confirmation emails?

The title says it all. There are several users who have registered but have yet to confirm their email addresses. Based on their unique email domains, I suspect that the majority of unconfirmed ...
Mus's user avatar
  • 119
1 vote
1 answer
92 views

redirect to my login page if not logged in

When a customer wants to leave a review on the product page, they are prompted to log in if not. Do you have a proposal to send the customer to the a specific login page and then return once logged in?...
Yves's user avatar
  • 11
0 votes
0 answers
58 views

TYPO3 to Wordpress Migration (Users)

I got a problem with migration from TYPO3 to Wordpress. We got like 4.000 Users in Typo3 and want to migrate them to Wordpress. Typo3 uses BCRYPT Password Hash, and Wordpress PHPASS. I’ve changed the ...
user243602's user avatar
0 votes
0 answers
12 views

How to remove/limit Editor accounts privileges, to prevent them from deleting media and pages created by Admin

How can I remove (or edit) Editor account privilege's, to prevent Editor accounts from making any changes to things Admin accounts upload or create? For instance, Prevent Editors from deleting/...
Omar Juvera's user avatar
0 votes
1 answer
1k views

Can't save changes or modify settings in Dashboard but Pages and Posts are fine

I am working on a client site from a previous developer. It needed many updates so I updated WordPress to v.6.0.1, Astra theme 3.9.1 (uses a child theme) and the many plugins in use. After all this, ...
dugost's user avatar
  • 1
0 votes
0 answers
46 views

Allow users to edit post without logging in

I'm working on a site where non-logged in users are able to submit their posts. It's easy to do on front end, however, when the posts need to be edited, it's a completely different story. So, is there ...
Sam1501's user avatar
  • 11
0 votes
1 answer
106 views

wp_authenticate_username_password not authenticating properly when pass username and password

I am developing custom login page and want to login through username and password. To authenticate user, i am using this function wp_authenticate_username_password() $usr_user = ...
Utkarsh Saxena's user avatar
46 votes
4 answers
137k views

How do I add a field on the Users profile? For example, country, age etc

I'm not very good with computers/codes etc. I use a plugin that makes a registration form thingy and in that form I added country, age group, gender and so on. I click the option that will add the ...
Chloe Aus's user avatar
  • 461
0 votes
1 answer
19 views

Will users still be able to log in if I change host?

The title says it all. I am taking over a website from somebody who lives in another country and will host it in the UK. Once the migration process is complete (moving it from their host to mine), ...
Mus's user avatar
  • 119
0 votes
0 answers
80 views

How can I display different menu for logged in users using a block theme

I am trying to display a different menu for the logged in users. The problem is that the classic wp_nav_menu_args filter does not work for block themes. Or I can't make it work. Does anybody know how ...
GKaplan's user avatar
0 votes
1 answer
74 views

Change a subsite Admin role of a WordPress Multisite after 24 hours registering

change WordPress multisite users' role after registration. function woo_admin_to_editor($blog_id, $user_id) { switch_to_blog($blog_id); $user = new WP_User($user_id); if ($user->exists()) { $...
Raphael Oluwasanmi's user avatar
0 votes
1 answer
20 views

How is user visits calculated

the users screen includes the column 'visits'. It lists the number of visits but I would like to know how it is calculated?
Horatio's user avatar
0 votes
0 answers
15 views

Add a product for all users based on a condition (WooCommerce)

Hello everyone in my wordpress website, I want to add a product to all users based on a condition, I mean if a condition is true I will inform specific users and then add the product for them, how can ...
Mahdi Ali's user avatar
0 votes
2 answers
2k views

Allow a user or role to view drafts and previews, but not other admin privileges?

How do I allow a specific user or a specific role to view drafts and previews, but not allow them to edit posts or have any other admin capabilities? I can add a custom capability to a role, but don't ...
Michael's user avatar
  • 281
0 votes
1 answer
1k views

WordPress 5.8 - Hide or Remove personal fields from admin Profile page

There are several threads on this topic, but none updated to Wordpress 5.8 The question is, in 2021 WP 5.8, what is the cleanest or recommended code to hide profile fields when creating/editing a user,...
Maskplain's user avatar
0 votes
1 answer
719 views

Link custom post type to users membership

I'm building a medical lab site, I'd like to link a custom post type - results to users. How can I link results CPTs to a user? The idea is to be able to associate multiple test results to a single ...
jeno's user avatar
  • 48
0 votes
2 answers
3k views

change user password REST API

I am trying to let a user change their password via the API. What it looks like here is that I can send a POST request to the users endpoint with their user ID at the end, sending the new password in ...
user8463989's user avatar
0 votes
1 answer
27 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
1 answer
86 views

Redirect WordPress page to the latest created post by the logged in author/user

I have a basic WordPress code that redirects someone to the last post type created on the site, in this case is the "case" post type: <?php /* Template Name: Redirect */ $args = ...
Sean Bagheri's user avatar
1 vote
2 answers
3k views

When I try to login in wordpress it is showing "USER Doesn't Exists"

The main Issues is that I am entering the email address & password that I used in creating my WordPress site in digital but It shows that the email address & username doesn’t exist even I ...
Sachin's user avatar
  • 41
16 votes
7 answers
42k views

How to check if a user exists by a given id

Is there any way to check if a user id exists? I want to create a function similar to username_exists() but which returns if the id exists or not.
Frankolin's user avatar
  • 163
0 votes
1 answer
138 views

Email notification when registred user clicks a link/visits page

Wordpress- I need to get an email which signed up user visited/clicked on link/button/or visited specific page. Email needs to tell me at least their username, or something from sign up form from User ...
Andrej Chalas's user avatar
1 vote
2 answers
1k views

No user found when using REST API

When I use a REST route whilst logged in, and call wp_get_current_user(), no user is found. However, the request method, eg POST is processed without issue. Example REST route registration. ...
dewd's user avatar
  • 179
0 votes
1 answer
40 views

Group users by meta field, with name of meta field as group title

I'm creating a employee photo directory based off users from my site. I'm trying to add front end filtering for this query and I have it mostly working. What I'm trying to accomplish is to sort the ...
NW Tech's user avatar
  • 707
0 votes
2 answers
632 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->...
sariDon's user avatar
  • 265
0 votes
1 answer
80 views

Add custom css to specific user

I need help with something for my wordpress site. I want to add custom css to a specific user. For example, user B. but I couldn't do it. Here I tried the following css code: div [user="id"] ...
ByWorld's user avatar
0 votes
1 answer
2k views

How to add registration date and last login date to user list page

To assist with managing a WordPress install with a large number of users, is there a simple way to include the date the user registered and they date they last logged in as additional columns on the ...
Brett Donald's user avatar
0 votes
1 answer
77 views

Does Wordpress Super User or Administrators can create and edit post and media on behalf of a user

For my project I need to administrate user post and media without access to it personal account. So I must be able to create and edit a post (by is user name) before or after it has been created on ...
imagIne's user avatar
  • 105
49 votes
6 answers
58k views

Getting a List of Currently Available Roles on a WordPress Site?

When writing WordPress plugins there is often a need to set up options for which roles on the site have access to certain functionality or content. To do this a plugin dev needs to fetch the list of ...
jerclarke's user avatar
  • 3,063
0 votes
0 answers
20 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
1 answer
224 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
12 votes
9 answers
44k views

Get multiple roles with get_users

I've got some code like this: $query_args = array(); $query_args['fields'] = array( 'ID', 'display_name' ); $query_args['role'] = 'subscriber'; $users = get_users( $query_args ); foreach ($users as $...
blogjunkie's user avatar
1 vote
1 answer
1k views

Display custom user profile fields in wordpress

New to wordpress development. I was trying to solve the problem of adding extra fields to my wordpress logged in subscriber user profile area, and also echoing the field values in my custom page ...
Nnah Kenneth's user avatar
0 votes
1 answer
100 views

(How) does WordPress protect direct access of user data?

I am setting up a WordPress with a user system. User information (names, profile picture) of all users should be private, and only accessable when logged in. The "Ultimate Member" plugin ...
M.G.Poirot's user avatar
20 votes
3 answers
12k views

How to allow an user role to create a new user under a role which lower than his level only?

I have three extra roles in my site. Doctor Receptionist Guest those roles are added by following code: * adding Doctor role */ $doctor_role = add_role('Doctor', __('Doctor'), array('read'=>'...
Riffaz Starr's user avatar
0 votes
2 answers
13 views

Transform user name before displaying

Users are created whith name in upper case on my site, but some admin want to display it in lower case. I had a custom field in user profile to identified those admin, but I don't know what hook I can ...
Jean-Christophe Barrez's user avatar

1
2 3 4 5
42