Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
0 votes
1 answer
25 views

Can I provide a user's user_ID to them and can it also be searchable in a member's directory

We would like a user (student) to have a student ID that they can quote and this stays with them as they learn with us. When they create a profile, by registering on our site is it possible to provide ...
AB_100's user avatar
  • 1
0 votes
0 answers
34 views

Multisite Login Access Restrictions

I am building a multisite where users can sign up to create a subsite about there business. I would like to have them be able to login to the backend and edit there subsite but restrict them from ...
Daemon's user avatar
  • 1
0 votes
1 answer
363 views

WordPress password as plain text in email

I am working on a project and we need to send users current passwords when they log in. So the only option is to the use the password reset feature when the user enters the email, an email will be ...
Sannan Malik's user avatar
0 votes
1 answer
71 views

Recognize logged WP user in existing REST API

I have a plugin using pre_get_post filter to hide posts depending on which user is logged. However the "parent page" selector in the WP "edit post" page uses a wp-json call to get ...
a-coder's user avatar
  • 400
0 votes
1 answer
78 views

Set a minimal number for next user_id

I have a WordPress website with 111 users, I have to import +45000 users who had a predefined user_id starting from 31800001 to 32200905. I know that I can import and set their user_id to their, ...
JARYOP's user avatar
  • 3
0 votes
2 answers
133 views

User Query Multiple Orderby Clause

I'm having trouble getting consistent results from a WP_User_Query when ordering by multiple meta values. There is a meta field that contains a serialized list of IDs, and I need to display users with ...
davvcarpenter's user avatar
-4 votes
1 answer
353 views

Undefined Function Fatal Error with Shortcode [closed]

I asked AI ChatGPT: Can you develop a wordpress shortcode to create a list of users of a certain role and for each one show if they commented on a certain post (counting how many comments they left)? ...
Simone Bionda's user avatar
0 votes
1 answer
91 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
247 views

MySQL query to list users who never signed in

What MySQL query can I use to get a list of users who have never logged in to WP? Some background... My WordPress website has been running since 2015 and initially, I had a newsletter form that would ...
Lazhar's user avatar
  • 183
0 votes
1 answer
26 views

Want to add Number of Products added by each shop manager in users list

Actually I want to count how many products have added by each shop manager So thats why I Want to add Number of produts column here Can anyone Help me in it???
Muhammad Shoaib's user avatar
0 votes
1 answer
130 views

Filter and manipulate the get_current_user() function

What i need: To perform my own logic every time get_current_user is being called Is it possible to use add_filter() to intervene in the get_current_user function logic?
Semion Vino's user avatar
0 votes
0 answers
275 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
1 vote
0 answers
244 views

Create Unique and Customized User ID for Website Members in WordPress

I want a Feature which can allow Custom User ID creation at Registration on WordPress. This will be different from the User ID that WordPress creates at Registration. This one is something that is ...
Gamicord's user avatar
  • 111
0 votes
0 answers
138 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
748 views

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 search" input box

I have been looking to extend the ability to search users in the backend for some time and have tried variations of several functions recommended in these articles and posts along with others not ...
Johnathan's user avatar
0 votes
0 answers
76 views

Exporting CSV of users with custom user taxonomies out of Wordpress

I'm trying to export a CSV or XML out of a WordPress site that has custom taxonomies added to the users. The site I'm working with adds custom taxonomies following the format here. Plenty of export ...
PHS's user avatar
  • 61
0 votes
0 answers
39 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 vote
0 answers
43 views

Increase by one the user counter on specific role

Hi i work on this code to increase by one the total users at users.php (fake counter) function my_fake_views($args) { $users_counts = count_users(); $total_users = $users_counts['...
George Ch's user avatar
0 votes
0 answers
13 views

WP Multisite Users Not Linking

Hi everyone… I’m trying to make a multi site (same site but different languages) and I need it to be available to all users, but when I make an account, it can only log in but has no access to any ...
Unix's user avatar
  • 1
0 votes
1 answer
350 views

Does wp_login hook fire on user registration?

My site is set to immediately login a user after they register. I'm writing a plug-in which needs to fire wherever a user logs in. If I order the wp_login hook, will this fire at user registration (...
AutoBaker's user avatar
  • 150
0 votes
1 answer
31 views

How to lock users account until approvation

I have created a custom role that I've named customer public function setup_user_roles() { add_role('customer', 'Customer', $customer_capabilities); add_role('moderator', 'Moderator', $...
devdev's user avatar
  • 1
1 vote
0 answers
34 views

WP query with variables gives no result for specific user

I'm trying to fetch one custom post with two values: the logged in user ID and a known string, both as variables. The query works out fine when testing on an admin account where the user ID is 1 and ...
Astra Martha's user avatar
0 votes
1 answer
50 views

Redirect user based on role when they try access a particular page

Please how can I redirect a user base on the role when they try to access a particular page? I would need the code to do this, please.
PASCHAL DANIEL's user avatar
2 votes
1 answer
754 views

How do you disable the verification process of user email changes?

When you change the email of a user they will receive a confirmation email and only once they verify the email adress it will be changed. How do i change this so that the email will instantly change? ...
NSsem's user avatar
  • 23
0 votes
0 answers
24 views

Remove @gmail.com from WordPress username

is there a code that I can put in the function of my site, so that if a user's username is [email protected], it will be targeted like this, for example, [email protected], it will be automatic, this ...
Mmdtam's user avatar
  • 1
0 votes
1 answer
34 views

get Discussion setting in wordpress

I am writing a shortcode for comments i need to know if admin wants users to logged in for commenting i need to know this option user must be registered and logged in for commenting is there any ...
Ali Afzali's user avatar
1 vote
1 answer
139 views

Why does a super admin on multi site get a rest_user_invalid_id error code when requesting user details through REST?

My goal is to (completely) delete users from a multi site installation using the REST API. Using DELETE or GET ends with a rest_user_invalid_id error code even though the user (and its id) exist. curl ...
OpenHaus's user avatar
  • 113
0 votes
1 answer
30 views

Whats the proper way to add a new user via a front end form?

I am building a form on the front end that allows the user to add a new user by filling out the name, email, and password fields and hitting submit. I understand that I can use wp_insert_user() with ...
patricko's user avatar
  • 101
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
1 answer
707 views

Edit text of Wordpress "Register" button

On the default WP registration page I want to edit the text of the blue button from "Register" to "Accept and Register". I want to do this without using a plugin, if possible.
Martin Turberville-Smith's user avatar
1 vote
1 answer
94 views

How do I count the number of pages a user has seen on my site, and force them to log in after a certain amount

I'm looking to write a little function that counts how many pages the user has clicked through in this section. When it gets to a certain amount, I want to prompt them to log in and prevent them from ...
DJZEEGLER's user avatar
  • 119
0 votes
0 answers
1k views

Allow Weak Passwords

a client wants to use a very specific password and i'm trying to update it in the user page. i keep getting this error, Please choose a stronger password. Use at least 12 characters, and include ...
patricko's user avatar
  • 101
0 votes
0 answers
168 views

how to delete in phpmyadmin sql - all users with certain condition and all dependencies

I have in my wordpress website a bunch of pages that has mydomain.com/author/gertielamrertyk/ can someone help me create an sql that will delete all users with certain condition (in my case it is a ...
Axil's user avatar
  • 61
-1 votes
1 answer
89 views

Anyone Can Register

Please explain what is the purpose or intent of the setting "Anyone can register"...is this a backend setting or does it make my personal information available?
K Eddy's user avatar
  • 1
0 votes
1 answer
403 views

Disable Author Archive just for certain roles in bulk

Hi I have a lot of users that have the role in wordpress as "Buyer" I want to be able to disable these users archive page so it is not public but I want to keep public users that have the ...
Paul Briggs's user avatar
0 votes
0 answers
167 views

can't create user without email for an author after converting single site to multisite

We're converting a single site to multisite, and in the process we're seeing something strange with users. Previously, we could create and update users to use as authors that don't have an email ...
Erich's user avatar
  • 111
0 votes
1 answer
122 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" ...
Xavi Montero's user avatar
0 votes
1 answer
51 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 ...
Jayce's user avatar
  • 3
0 votes
0 answers
113 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 ...
ChrisPy's user avatar
0 votes
1 answer
556 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 = "...
Teymur Abbasov's user avatar
0 votes
1 answer
88 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(); ...
ratib90486's user avatar
0 votes
1 answer
228 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 ...
Teymur Abbasov's user avatar
0 votes
2 answers
246 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 ...
James's user avatar
  • 205
1 vote
1 answer
89 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 ...
Teymur Abbasov's user avatar
0 votes
1 answer
291 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' ...
user3308900's user avatar
1 vote
2 answers
689 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 ...
Mand's user avatar
  • 111
0 votes
0 answers
28 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), ...
StefanBD's user avatar
  • 111
0 votes
1 answer
32 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 ...
Tommizzy's user avatar
0 votes
1 answer
619 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 ...
Teymur Abbasov's user avatar
0 votes
1 answer
274 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 ...
Zterling's user avatar

1
2
3 4 5
42