How to use search_columns in WP_User_Query?

This is covered in the link you reference: The search_columns attribute does not set what should be searched for in each column, but instead specifies which columns should be searched for the term set in ‘search’. Specifically, you can only search for one term – but you can look in one or more columns. //Search … Read more

Adding tags and inputs to a user’s profile

This is a great plugin that allows you to easily add custom fields to Users (among other things). http://www.advancedcustomfields.com/ This tutorial will help you retrieve the values from user: http://www.advancedcustomfields.com/resources/how-to/how-to-get-values-from-a-user/

How to add country drop down menu to the user profile?

Try this /* Save selected data */ add_action( ‘personal_options_update’, ‘save_user_fields’ ); add_action( ‘edit_user_profile_update’, ‘save_user_fields’ ); function save_user_fields( $user_id ) { if ( !current_user_can( ‘edit_user’, $user_id ) ) return false; update_usermeta( $user_id, ‘country’, $_POST[‘country’] ); } add_action( ‘show_user_profile’, ‘Add_user_fields’ ); add_action( ‘edit_user_profile’, ‘Add_user_fields’ ); function Add_user_fields( $user ) { ?> <h3>Additional Field</h3> <table class=”form-table”> <tr> <th><label … Read more

Set default page for user account in admin

You set a custom url after rewrite from a login. A small example, usable in a template of the theme to login. <?php $redirect = esc_url( ‘your-url’ ); if ( ! is_user_logged_in() ) { $link = ‘<a href=”‘ . get_option( ‘siteurl’ ) . ‘/wp-login.php?redirect_to=’ . home_url( “https://wordpress.stackexchange.com/” ) . ‘”>’ . esc_attr__( ‘Login’, ‘documentation’ ) … Read more

How can I link users across multiple subdomains?

The fact that you haven’t mentioned MultiSite in your post makes me think that doing some research there would be a good next step for you: https://codex.wordpress.org/Create_A_Network User Accounts are shared across sites in the network, and sites can be different subdomains.

Creating a Front-end based User Search

As you haven’t offered the details on what you’re after, I’ll try to grab them all very briefly. Use the API – public WP_User_Query API functions Basically get_user_by() should be enough for you. Let’s say you fire of your form and the input field name was user_id. So you’d just retrieve the value from the … Read more