Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
0 votes
1 answer
2k views

On button click, redirect users to registration page instead of another page

I have a button that I have that leads users to a page on WordPress called /portfolio/, so is there a way that I can redirect users to the /registration/ page until their logged in? I'm using a ...
0 votes
1 answer
1k views

UPDATE on SELECT results. A SQL query to swap Author with Meta Box value

I inherited a project where, for some reason, the previous developer make a custom post type for authors and a custom select listing all those authors cpt titles in the post edit screen. This led to a ...
0 votes
1 answer
2k views

How to Access wp_usermeta Data Immediately After a New User is Created

I am trying to find a WordPress action hook that will allow me to access a new user's wp_usermeta information, immediately after the user has been created. In our registration process, custom fields ...
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 ...
16 votes
10 answers
37k views

Adding fields to the "Add New User" screen in the dashboard

I'd like to add the field "Company Name" to the add new user page in the admin panel. I've done quite a bit of searching and have been unable to find details on how to do this. I can easily add info ...
2 votes
2 answers
933 views

how do i get a greeting for logged in uses by the time of day

hi i am looking to combing to pieces of code into 1 both work but not together keep no matter what i try it keeps crashing the site <?php $t=date("H"); if ($t<"12") { echo " Have a good ...
0 votes
2 answers
2k views

Changing Wordpress author name in database

I originally begun my wordpress site using a psudonym. Over the past few years I have been attributing my own name to all articles and have had the author name options switched off. Now I'm changing ...
0 votes
1 answer
1k views

Get current user array with post string

I need to get 10 current user fields and pass the field values to a post string. The post string is expecting certain label names for each value. Example - post string expects 'firstname' => '...
0 votes
3 answers
3k views

Assign a Post to a User

1 - I have a CPT, with 10 posts. 2 - I have 10 users Q : How can i assign a single post from my CPT, to an unique user ? -> Each user must see only it's assigned post (Each post will be assigned by ...
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-...
0 votes
1 answer
741 views

Specific Content on pages based on user

I have a page on my site and would like to show different content on this paged based on who is logged in. If the user isn't logged in, show the login form or if the user is logged in but does not ...
0 votes
1 answer
1k views

Add WordPress users to a custom post type

I have created a custom post type called Groups. I would like to provide an option to add Users to these groups in the Group edit page. Any help would be appreciated thank you. P.S: I thought of ...
0 votes
1 answer
815 views

Modify new user email notification in network admin screen wp multisite

Can please teach me which function reference should I use to modify new user email notification in network admin screen -> add user. I want to use custom email template for notify user? it will ...
2 votes
1 answer
1k views

How to get profile user id when uploading image via media uploader on profile page

I have a PlugIn which lets a user upload an image to a user profile in the backend. Now I want to access the user id in the uploader to change the filename of the uploaded image. On the user profile ...
0 votes
1 answer
2k views

admin ajax is not working for non logged in users

I know that this issue has been discussed many times, but I think I tried most of the advises. This is my code: $.post('<?php echo admin_url( 'admin-ajax.php' ) ?>', {'action': '...
0 votes
1 answer
905 views

Can't activate a user on multisite install

So I have a user that I can't activate with the unconfirmed plugin manually. His user was created on all appropriate sites, but his account isn't listed as activated. The link in the activation email ...
2 votes
1 answer
2k views

How to delete all customer user account that haven't placed a single order?

Recently I've had an influx of spam users registering on my Wordpress website and I am trying to delete them all if: they have a "Customer" role haven't placed at least one order before As I could ...
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?
0 votes
1 answer
2k views

Updating custom user meta

I have created a new custom meta for my wordpress users. These are just 2 radio buttons (either 'Yes' or 'No'). I have created a button on the front end and want it so that if the button is clicked, ...
0 votes
1 answer
2k views

wp_insert_user always tries the same user name

The page name with my form is "Register", which means the slug is "register". That is the first piece of info that is tied to my theory about my error. When I run wp_insert_user I get a success the ...
1 vote
3 answers
3k views

Add a role and give admin priviledges

I am creating a Super Admin role in wordpress Roles. $capabilities=array(); add_role('Administrator', 'Administrator', $capabilities ); add_role('Super Admin', 'Super Admin', $capabilities) ); So ...
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 ...
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 ...
6 votes
2 answers
2k views

Give to site admin the option to "skip confirmation email" when adding new user

in wordpress multisite when we give to site admin the option to add new users, site admin dont have the "checkbox" to add the new user without sending the user email with link activation (see the ...
0 votes
2 answers
14k views

Get avatar of the logged-in user in Wordpress

How can I get a user avatar to display in the header of my WordPress site? I've tried: <a href="<?php echo get_author_posts_url($post->post_author); ?>" title="<?php the_author_meta( '...
1 vote
1 answer
1k views

import (migration) user database to wp-users

I am having hard time for importing to user-meta and post-meta from my non-wp-tables. I am trying to do db migration from user table and post table to WordPress tables. So it might be user table to ...
0 votes
1 answer
742 views

How to keep the plugin submenu open on viewing a custom version of users.php?

I have added to my-plugin submenu a custom view of the user list using users.php and a my_plugin_view argument to filter the request: add_submenu_page( "my-plugin", '...
0 votes
1 answer
2k views

Pagination for user list

I am showing all the users by using the get_user() function. But I need to paginate the results. I tried a lot, but didn't succeed. Here is the code, which doesn't work as expected: $args = array( '...
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, ...
1 vote
1 answer
1k views

how to get WordPress admin user table columns name in my plugin

I used this to get User list table columns Name. add_filter( 'manage_users_columns', array($this , 'new_modify_user_table')); public function new_modify_user_table( $column ) { $column // ...
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 ...
0 votes
2 answers
2k views

User list order by user meta

i have created user vote that can vote users or author of posts. so for example have 4 users which looks: user --- ID=1 --- META KEY='_thumbs_rating_up' --- META VALUE='13' user --- ID=2 --- META KEY=...
0 votes
2 answers
3k views

User profile in front-end

I want every user to get a profile in the front-end of my website. So I want to visit website.com/user/user-name and view all the information of this user. Is this somehow possible? I would like to ...
1 vote
3 answers
3k views

Move users and passwords from one wordpress site to another

I need to copy over Wordpress users with roles/passwords intact to a new install. I'd prefer not to copy the entire site (though if I have to I will.) Currently I only have the one main admin account ...
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 ...
6 votes
2 answers
5k views

Remove email verification when new user register

Please note I'm not posting this question without doing google search, but the problem is every single result I found is either about BuddyPress or WP Multisite, but I have a WP Single installation ...
4 votes
2 answers
2k views

Do not allow users to create new posts and pages

I'm defining a new user role called Proofreader and as the name says, users of this group should be able to read and also edit the posts and pages. But I do not want them to create new ones. With my ...
0 votes
1 answer
1k views

Is it possible to create a custom admin page for users?

I want to greatly restrict the user's authority in the website. I don't want to give the user access to the admin console but I do want to allow the user to edit their username, email, and password. ...
0 votes
3 answers
3k views

Disable emails for new user registration

I want to disable the default email that is send when user is registered. I am using this plugin for email verification User Verification By PickPlugins, which sends an email with confirmation link, ...
0 votes
1 answer
850 views

Append USER ID to an outbound link?

Please bear with me as I am a newbie. Is there a way to append a USER ID aka a logged-in user's ID to any external link. For example, a logged-in user clicks a link, the link then appends that user'...
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 ...
0 votes
1 answer
1k views

User Following System

I have a custom plugin which allows users to follow each other. The follow and unfollow functionality works by ajax which is fine but there are just a few bugs that need sorting out which I am unsure ...
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()) { $...
3 votes
1 answer
1k views

Find out who created a certain user?

How can I find out who created / edited / deleted a certain user? I got a notification email that a new user has been created but I dont have any idea who made it.
0 votes
1 answer
1k views

Change css for certain user roles

I am trying to do a #tribe_events_event_options{display:none;} for all the author users on my site. I don't want them to be able to set an event to featured, and I thought the simplest way was to not ...
0 votes
2 answers
1k views

How to create front-end (editable) Wordpress user profile pages?

So I am using Gravity Forms to create registration and login forms. But after the user logs in, I want them to be able to see a custom front-end profile page instead of the default Wordpress user ...
0 votes
1 answer
2k views

Check for empty username or password on login

I'm building a custom login page for clients and wish to keep the wp-login page for site administrators. For checking for empty fields I'm using the code: function verify_user_pass($user, $username, ...
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 ...
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->...
2 votes
2 answers
729 views

WordPress plugin Write User/staff ID as the same as the WordPress User ID

I have a question in regards to a WordPress plugin (Bookly) that creates a Staff ID for an already created WordPress user, and hopefully, somebody may be able to help me with. Currently Bookly adds ...

1
2 3 4 5
42