From admin edit user page query either the user_nicename or username field value of the user profile being edited or viewed

To get the username of a user you can use the get_userdata() function. Pass it the users ID $user = get_userdata($user_id); Then the have access to the username or user_login as its called echo $user->user_login; You can read more about this function here: https://codex.wordpress.org/Function_Reference/get_userdata Or if you need to get the user by other information, … Read more

Following/Followers Users list Using Ajax Pagination inside Author Profile

The problem is this line: $curauth = (isset($_GET[‘author_name’])) ? get_user_by(‘slug’, $author_name) : get_userdata(intval($author)); First you make the ajax call with an POST-request, that is the reason why the GET array is empty. Second the variable $author is not defined. So every time you call the script, the variable $curauth is empty. A solution could be … Read more

How to save multiple custom user profile fields using repeater JQuery

Add square brackets to input names to get PHP to interpret them as an array of data instead of overriding the value with each new input. so your input will look like this: <input type=”text” name=”skills[]” id=”skills” value=”<?php echo esc_attr( get_the_author_meta( ‘skills’, $current_user->ID ) ); ?>” class=”textbox” /> <input type=”text” name=”skills_percent[]” id=”skills_percent” value=”<?php echo esc_attr( … Read more

how to save multiple checkbox in usermeta and get it?

First get the data $data = get_user_meta( $user_id, ‘service_name’, true); You find an array of all entries in $data. You can do it this way: <input type=”checkbox” name=”service_name[]” value=”Architecture” <?php echo in_array(‘Architecture’, $data) ? ‘checked’ : ”); ?>>Architecture<br> Untested, but should work.

Make user’s first and last name as user slug

To update existing users, try to make a script file and put that code on it (you have to require necessary file wp-load.php if you put that file in the root of your wp instance) or by listning on a hook like init hook : $blogusers = get_users( ‘role=subscriber’ ); //get users by role // … Read more