Tag Info

New answers tagged

0

I would use the action wp_footer. You could do something like below. You do not need to loop through all posts whenever a post is showing. Just add the current post score to user for the current post. add_action('wp_footer', 'wpse55725_update_user_score'); function wpse55725_update_user_score(){ if( !is_singular('post') ) return; // only ...


0

Before retrieve the user, you need to 'save' the information of which user save the meta... WordPress does not store that info, and you can't get something that does not exists. Saving that info for all meta keys is overwhelming, there are a lot of custom fields WP uses internally, so - probably- you need to choose for which meta key saves author info. ...


0

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 ...


2

Do you have any data showing that user meta won't work? Until you do — don't mess with it. You are not likely to get from-scratch solutions as convenient and more performant without significant effort.


0

the wordpress user query by default doesn't allow the display_name in search column even it's added in , here is a solution http://manchumahara.com/2014/04/03/search-user-by-display-name-in-wordpress-sitewide/ Example: $args= array( 'search' => 'Display Name', // or login or nicename in this example 'search_fields' => ...



Top 50 recent answers are included