Get meta value and associated user meta
Just alter your database query to also grab the user ID, and then return an array of data objects (as opposed to just the meta value): function get_meta_values( $key, $type=”workout”, $status=”publish” ) { global $wpdb; if ( empty( $key ) ) return; $r = $wpdb->get_results( $wpdb->prepare( ” SELECT pm.meta_value, p.post_author FROM {$wpdb->postmeta} pm LEFT JOIN … Read more