Can’t display user bio

I’m not certain as I have no experience of ACADP, but I suspect your problem is the function, acadp_get_user_slug. What does it do? Likely not what you think! As the following will work for the user admim: function display_user_bio() { $user_slug = ‘admin’; if($user_slug != ”) { $user = get_user_by(‘login’, $user_slug); if($user) { return get_the_author_meta(‘description’, … Read more

Find matches of a variable in custom usermeta

You can use WP user query. Assuming that your meta_key is authmeta you can use the following code to find the users with meta key authmeta and value of your $var variable. $user_query = new WP_User_Query( array( ‘meta_key’ => ‘authmeta’, ‘meta_value’ => $var ) );

Update another users meta

wp_ajax_nopriv_{$action} can trigger a non-logged in ajax request. add_action( ‘wp_ajax_nopriv_add_foobar’, ‘prefix_ajax_add_foobar’ ); function prefix_ajax_add_foobar() { // Handle request then generate response using WP_Ajax_Response } get_user_by can pull the user’s data via email $user = get_user_by(’email’, ‘[email protected]’) update_user_meta can update the user’s metadata. update_user_meta( $user->ID, $meta_key, $meta_value, $prev_value );

Custom user meta values in shortcode

You didn’t mention whether users could only reach this page when logged in, so this example includes a check to make sure the current visitor is logged in, otherwise it won’t output anything. <?php // create the shortcode add_shortcode(‘wpse_312268_show_cc_info’, ‘create_wpse_312268_shortcode’); function create_wpse_312268_shortcode() { // only do something if user is logged in if(is_user_logged_in()) { // … Read more

Custom user meta data [closed]

Read up on the documentation for the filter login_redirect And also see the answer to this question already answered I’m not totally sure what you are trying to do with the PIN – is that sent to the user via text/email or displayed on the page? Either way, the page you redirect to would need … Read more