0
votes
0answers
20 views

Role Column Sorting

I'm trying to add sorting on Role column on user listing by desc and asc but I can get it work, it always show "No matching users were found." below are my code add_filter( ...
0
votes
1answer
47 views

Get users from all/specific blog by user_role and current_user role

Something I've needed and think a fair few people might need as well is: getting users from all or a specific blog based on the user_role's of the accounts they wish to see, while also differentiating ...
0
votes
1answer
57 views

Hide user fields based off capability

I'm struggling with this one. I am trying to hide 2 user profile fields for the current user. Only the admin or user with "edit_users" capability should be able to view/edit these fields. Code: ...
0
votes
1answer
134 views

Updating User Meta with SQL Query

I have a Wordpress site that needed to have 9,000+ users imported to set up a Directory Listing. I imported them from an existing MySQL (non-wordpress) database and everything imported just fine. ...
0
votes
1answer
65 views

Set user ID at time of wp_create_user

I'd like to add a new user to the WordPress user table. The code for wp_create_user works fine but it is adding the user incrementally to the next available ID in the user table. Instead, I want to ...
0
votes
1answer
93 views

Get author meta of all writers

We know from the docs that you can get an author's meta like so: <?php get_the_author_meta( $field, $userID ); ?> But I would like to have a custom "About us" page which displays all the ...
0
votes
1answer
86 views

Display and Allow users to edit their own profiles

I'm working on a site that would have different categories of users, and each user will have his own user profile page with a vanity URL, which he can share with others. The users are divided into ...
0
votes
1answer
372 views

Assigning multiple or additional capabilities to specific users or how to create additional roles like bbpress roles?

even though I think I understand the hierarchy of roles in WordPress, I never really bothered creating my own user roles or custom capabilities. What I need to achieve is to assign a few capabilities ...
0
votes
1answer
87 views

Get users with different roles and call function on each of them (user_meta)

First of all, I have a custom function in functions.php that gets some author information. This works on great on single posts with a single author. <?php function the_author_box() { ?> <div ...
0
votes
0answers
63 views

Assign specific editor with custom user meta “A” to all authors with custom user meta “A” and exclude all other author access

I am looking to do the following: Logic/layout/cores: All contributors select a school in a custom user profile meta field All contributors also select a club in a custom user profile meta field ...
0
votes
2answers
171 views

update_user_meta on registration but only for default role type

So I am running the following to update user meta on regsitration: function set_user_rcp_default_subscriber($user_id) { update_user_meta( $user_id, 'wp_user_level', '0' ); update_user_meta( ...
0
votes
1answer
100 views

how do I add role and capability after I create a new user

I have a simple requirement: 1. create a user 2. create a role for the user 3. add capability for the role First, create a new user $uid = wp_insert_user($userdata); Second & Third, create a ...
0
votes
0answers
24 views

How can I display all the blogs where this user is editor in Wordpress Multisite? [duplicate]

Very similar question with correct answer I guess my question is simple, I run multisite and on some blog I want to display <> thing The link I posted does not work for me, but it is marked as ...
0
votes
2answers
561 views

Ordering users of a specific role by last name

I'm trying to display a list of authors by their last name. I can get the list to display but as yet I don't seem to be able to order the list by last name. Any help would be greatly appreciated. Josh ...
2
votes
2answers
1k views

wp_update_user not updating

In desperation I am asking for help in this forum too - if someone (ANYONE!) could take a look a this post and see if they could help I'd be eternally grateful ...
0
votes
1answer
228 views

WordPress missing user roles on local dev machine. Live site works fine

I have a live WordPress installation and a local one for development purposes. I just exported the live database, replaced all occurences of the live siteurl with the local one, and imported on my dev ...
1
vote
1answer
741 views

How to loop through each user id?

The functions that I am aware of: WP_User and wp_get_current_user seem to only get the user object of the current user. As an administrator, if I want to display certain profile information in a ...