Where do I implement this display of User Meta Data, and how to put it in a table?

If I understood your question correctly, you want to display this data on a page on front-end. In this case you can either create a page template in your theme folder OR create a shortcode in functions.php. Here is a quick shortcode that may help. add_shortcode(‘currentuser’, ‘shortcode_current_user’); function shortcode_current_user($atts){ ob_start(); $current_user = wp_get_current_user(); echo ‘<table>’; … 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.

Get user by meta data key and velue

This how my stored data function is for this meta group and get data stored $certification = array( ‘course_id’ => $certificate_id, ‘course’ => $certificate, ‘date’ => $date, ‘instructor’ => $certifying_instructor, ‘school’ => $school, ‘last_update’ => date(‘d-m-Y’), ); add_user_meta( $user_ids, ‘certifications’, $certification ); and this get data $users_detail = get_user_meta($user_id); $certificates = $users_detail[‘certifications’]; $n_course_id = array(); … Read more

Get all user meta_keys and then group users by matching values

Eventually came to a solution in case anyone needs it: function mb_get_user_meta_values( $mb_user_meta_key ) { if( empty($mb_user_meta_key) ) return; $mb_get_users = get_users( array( ‘meta_key’ => $mb_user_meta_key ) ); $mb_user_meta_values = array(); foreach( $mb_get_users as $mb_user ) { $mb_user_meta_values[] = get_user_meta( $mb_user->ID, $mb_user_meta_key, true ); } $mb_user_meta_values = array_unique( $mb_user_meta_values ); return $mb_user_meta_values; } Then I … Read more

Display current user metadata on WordPress page

You can try below snippet of code. i have develop shortcode you can take reference from it. function current_user_data_func( $atts ) { extract( shortcode_atts( array( ‘metakey’ => ”, ‘user_field’ => ”, ), $atts) ); ob_start(); if(is_user_logged_in()) { $current_user = wp_get_current_user(); $c_user_id = $current_user->ID; if(!empty($metakey)) { $value = get_user_meta( $c_user_id, $metakey, true); echo $value; } if(!empty($user_field)) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)