Questions tagged [users]

Refers to accounts with the ability to login and participate in a WordPress site.

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

Wordpress user role with create user capability?

I want to create a user type (Let’s call it “clinic” which is similar to editor role in wordpress) but with permission to add_users /create_users capability. I wanted to limit that capability of this ...
user avatar
0 votes
1 answer
21 views

Does wordpress support natively the concept of logging-in users? (not admins, but users of the website)

I need to create a small members area, probably for about 1000 users, not more. I want to set private information there, forms, interaction, etc. More in particular it'll be for "providers" ...
user avatar
0 votes
1 answer
40 views

delete_user_meta from a foreach results page

I have a real estate site. On property pages users can save homes as a favorite. The property gets added to the user meta data. I can successfully add and delete entries from the single property ...
user avatar
  • 3
0 votes
0 answers
17 views

how to let users upload their custom cover image

I have a dashboard for users (one page using elementor and buddyboss to change stuff like name profile pic etc). I want users to be able to upload a custom cover image. I found some code that almost ...
user avatar
0 votes
1 answer
16 views

Check if user has comment on current post

Hello I have multiauthor website and I need to create a condition to check if defined user ( no current user ) has comment on current post. Here is my code but I can not complete this $userid = "...
user avatar
0 votes
0 answers
20 views

Create membership numbers from wordpress user IDs

I'm looking for a solution to create membership IDs from the default wordpress user IDs. For example is there a way to prepend the IDs with something like ABC000 so the ID would change from 166 to ...
user avatar
0 votes
0 answers
6 views

Ultimate Member - Add UM Action under users

I have Ultimate Member plugin installed and I want to add an action under the Users > UM Action, that is similar to "resend activation email" action, but to resend "Account Welcome ...
user avatar
0 votes
1 answer
24 views

How do you manage your pages or functions that require logged-in users?

I'm having more functions and pages that require my users to be logged-in. Below is what I have in each of my functions, kind of a hassle to keep repeating this code. $user_id = get_current_user_id(); ...
user avatar
0 votes
1 answer
22 views

Display if author page is author page of current user

in my multi author website I have a button that users can upload their avatars. I need to display this button in author page. I can do it. I added this button to author page. The problem is that ...
user avatar
0 votes
2 answers
25 views

How to replace username with email address in users table

I have a custom built site that does not use usernames and everything requires use of their email address. The username is auto generated and looks bad in the table. I know there are filters and ...
user avatar
  • 195
1 vote
1 answer
51 views

Add email addresses to already registered users

my website users register with phone number OTP. That's why they have no email address in their accounts. Today I need email address in user accounts. I use this code to add email address for new user ...
user avatar
0 votes
1 answer
18 views

How can i filter wordpress users by custom feild?

I'm displaying users (authors) on a page. how can I add a filter based on user custom feilds? <?php // THE USER QUERY ARGS $args = [ 'role' ...
user avatar
1 vote
2 answers
40 views

Force logout ALL users at a certain time

I'm wondering if it's possible to logout all users 2 times a day using the function wp_logout() ? I see loads of plugins who can logout idled users but we want to log out every single users twice a ...
user avatar
  • 111
0 votes
0 answers
22 views

User with same Mail but a different additional info(like domain)

I know this is not the way u should go, but my customers want it so im looking for ways. Requirement: WP with one DB (3 Domains sale the same stuff) 3 Domains which use this DB (can be more later), ...
user avatar
0 votes
0 answers
12 views

Auto populate a user custom field from another user custom field

I have a WP theme with its own custom fields including one for Phone Number. I also installed the Digits Plugin which allows users to sign up/login with their phone number and OTP, which has its own ...
user avatar
0 votes
1 answer
8 views

Newly created user role not displaying on users screen

I have created a new role with the following code: add_role('sponsored_content', 'Sponsored Content', get_role('contributor')->capabilities); I have added users to this role. When viewing the ...
user avatar
0 votes
0 answers
17 views

Restrict users of site 1 to login in site 2 in wordpress multisite

I'd setup Wordpress Multisite. site-1: www.abc.com (is main site). site-2: www.abc.com/site2 (is a subsite). I'd setup other site in sub directory not on as a subdomain. Right now if a user register ...
user avatar
0 votes
0 answers
17 views

Can't log into wordpress site - I have made a new user and still cant access

I recently took over website management for my company but I can not access 1 of our sites. The user name and password provided by the last management team does not work. I refrenced my Wp-Config to ...
user avatar
0 votes
0 answers
11 views

Need help with creating a searchable user data by name or specific number like ID

Thanks for this gift. Here is my issue, i wish to be able to add users profiles to my wordpress company site in which we register the users name and other details as need be. The purpose for this is ...
user avatar
0 votes
1 answer
21 views

add class to element if user is not logged in [closed]

Please help . I need to add class to this button if user is not logged in <?php echo apply_filters( 'my_order_html', '<button type="submit" class="ADD-CLASS-HERE cfw-primary-btn ...
user avatar
0 votes
0 answers
9 views

Editor role can only create/edit/delete users who have one of two roles

I need help with something, what happens is that I have created a custom role derived from the Editor role that Wordpress has by default and I have added some extra capabilities. Now, my goal is that ...
user avatar
0 votes
1 answer
26 views

Can't add user- wrong message "this user name is invalid because it uses illegal characters"

I am working on a webpage for a client and we have encounter a weird issue. When I use the clients login and add users to the website It works perfectly. But when the client uses the same logins they ...
user avatar
0 votes
1 answer
34 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 ...
user avatar
0 votes
0 answers
9 views

"My Sites" incorrectly showing all network sites for all logged in users

I've searched this board for a similar question and answer, and I haven't seen anyone ask about this. Recently, after some updates, the functionality of the "My Site" item on the WordPress ...
user avatar
  • 1
0 votes
0 answers
9 views

Easiest way to create an user across several websites

I need to create an user with Editor access on several websites and instead of using the admin panel, I was wondering if I could do it on the db side. If so, what queries do I need to use? I am ...
user avatar
  • 1
0 votes
1 answer
18 views

users post count

I'm trying to set up users archive pages; I notice that, if a user exists and is the owner of a custom post, it doesn't have an archive page; so I looked inside user.php in order to include custom ...
user avatar
1 vote
0 answers
83 views

Rest API code to get ID of current user not working: get_current_user_id() gives 0

Background I am trying to write Rest API code to get the ID of the user who triggers the function in question. I found a fantastic answer to this exact question, that was very kindly provided by user ...
user avatar
  • 11
0 votes
1 answer
18 views

Filter users in a search

I have made a custom search in users in wordpress and I added it to the landing page by using a shortcode. I want to filter them according their roles, it means I want to exclude all Admin users. How ...
user avatar
0 votes
0 answers
15 views

User can't search himself on rest api

I have a custom role and here is the capabilities; Array ( [read] => 1 [edit_posts] => 1 [delete_posts] => 1 [upload_files] => 1 [list_users] => 1 ) The user is can ...
user avatar
0 votes
0 answers
12 views

How to safely trigger password reset emails for thousands of users

I'm going to be migrating ~17,000 user accounts from a non-WordPress platform to a new WP site. I'll be importing them using WP All Import, which I've done before. Once the users are imported, I'll ...
user avatar
0 votes
0 answers
24 views

Adding data to User profile

Some plugins for wordpress add fields to the users profile. For example "Company" or "Store" or "Group". How can I add the values to this fields from a custom a frontend ...
user avatar
  • 1
1 vote
1 answer
11 views

Show all posts by author

I used to have a page on my site where it would show all posts by a user and it worked. This was the code it was using: <?php //$wp_query = new WP_Query( array( 'post_per_page' => 12 )); ...
user avatar
0 votes
0 answers
17 views

I want to store user password (during registration) in an other table in the same database in addition to the user table MD5 Hash

i'm novice in wordpress, I built an app that connect to my wordpress database and I need user to authenticate in this (symfony) app with the same login and password as the main wordpress site. What I ...
user avatar
0 votes
0 answers
47 views

How to limit post (Exception pages) for current user in each role in front end?

Thank you for reading this question I need an option or code for each user in each role to see only their posts at the front end, and other users' posts to be completely hidden from them, even in ...
user avatar
0 votes
2 answers
65 views

Fetch all data of Users

I am trying to fetch users All information by using below code. if($_POST['orga_id']) { $users_query = new WP_User_Query(array( 'meta_query' => array( 'relation' ...
user avatar
  • 377
0 votes
0 answers
22 views

Authenticate user using Hashed Password in MySQL Query and C#

I am writing a custom component in C# that connects to WordPress database at backend. I am trying to authenticate users via Mysql select query but the hash is not matching. I have tried the answers ...
user avatar
  • 157
0 votes
0 answers
35 views

set automatically email address for WordPress users

User registration on my site is done with a mobile number. I want the email with the structure "{userid}@example.com" to be registered automatically after user registration. How can I do ...
user avatar
0 votes
1 answer
18 views

How to pull all the contributer users records and order by Designation (which is users meta data)?

I want to show all the contributors by the Designation. Following code is only pull the records and order by ID But I need to data order by Designation: function contributors() { global $wpdb; $...
user avatar
0 votes
0 answers
32 views

How to verify which WordPress user requested the API in ASP .NET Core?

I have a use-case where I have a WordPress site and an ASP .NET Core as a Restful API backend. I use the WordPress site entire for Frontend, CMS, and User Authentication. On certain pages of my ...
user avatar
0 votes
1 answer
150 views

ACF: How to get users with a ACF flexible content subfield with a specific value AND layout?

I am looking for a way to query users based on a user meta entry for an advanced custom field which has a given value and itself is from a given layout type. For example, let's say I have the ...
user avatar
0 votes
0 answers
71 views

Generate a QR code when creating a new WordPress user

I know that you can use the show_user_profile, edit_user_profile, personal_options_update and edit_user_profile_update to add and manage additional fields in user profiles. In a site I'm developing, I ...
user avatar
  • 1,617
1 vote
1 answer
30 views

count the total number of comments the user has received for his published posts

I want to count the total number of comments the user has received for his published posts. for example show: total comments of your all posts : 47 Is there a way to do this? Can you help me?
user avatar
1 vote
1 answer
53 views

Remove Capabilities from WP admin for specific user role

I am trying to remove some menu-links capabilities from the wp-admin for a user role called wsm. I have tried many ways and when i just add the code below it will remove those links from the menu for ...
user avatar
0 votes
1 answer
71 views

How to get custom post_author?

I have a post type that inserts email as a post. I also created users according to those emails. This is how I added my post type. $post_array = array( 'post_content' => $mail['...
user avatar
0 votes
1 answer
123 views

How to insert current user ID/entry ID into a shortcode?

I'm wondering if someone can help with a code snippet for the functions.php. I am using a plugin called Connections Pro with the extension Link, which connects the entries to the wordpress user. It ...
user avatar
0 votes
0 answers
42 views

Is it possible with a code snippet to display a green dot on top of every avatar on a WordPress site for each user that is online?

I tried with a plugin but this doesn't show the online status everywhere, only in some places. I want the online status of each user to be visible everywhere there is an avatar, in comments, user ...
user avatar
  • 1
0 votes
0 answers
21 views

How to display all user profile info in myaccount page wordpress

I was wandering how to display all user profile info in the myaccount page in wordpress. It only shows Name, Email and Password.
user avatar
0 votes
0 answers
19 views

How to add extra field in profile page and show in myaccount?

I need to add an extra input in user profile page and the result is to be shown in the myaccount page, in the Dashboard section. Example: user enters an alias in profile page and this alias appears in ...
user avatar
0 votes
1 answer
27 views

Delete user meta but only if found in array

I created a SAVE button that saves a page's URL to the user meta in an array. I'm trying to now create a REMOVE button but I'm finding that when delete_user_meta is used it deletes all entries in the ...
user avatar
  • 3
0 votes
0 answers
55 views

Clone wp-admin/users.php (Users Admin Page)

I have created a new page in admin. I need to show all the users in this page(like Users admin page). The reason for this is because i want to show certain custom user roles only on this page. I tried ...
user avatar

1
2 3 4 5
41