wp_user_query with meta_value_num for leaderboard
wp_user_query with meta_value_num for leaderboard
wp_user_query with meta_value_num for leaderboard
Export user data from Squirrly’s Starbox plugin?
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
How to update my jquery/PHP function to add/remove user as favorites in (WordPress) users list
You could use multiple meta clauses in your WP_User_Query, along with a LIKE comparison. Something like $args = array( ‘role’ => ‘member’, ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => ‘specializations’, ‘value’ => ‘doctor’, ‘compare’ => ‘LIKE’, ), array( ‘key’ => ‘specializations’, ‘value’ => ‘researcher’, ‘compare’ => ‘LIKE’, ), ), ); $found_users = new … Read more
Unfortunately, this is not documented at all. It took a while for me to get the answer by inspecting the code, and it is: in browser console you can test at first: wp.data.select(‘core’).getUser(1,{context:’view’}) where 1 is ID of the user. You can also omit context, to get all meta data available from REST, or give … Read more
Control page access based on User Meta data?
What MySQL query can I use to get a list of users who have never logged in to WP? None. WordPress does not store this information so this is not something you can do, you would need to add code for it but that would also require going back to 2015 to add the code … Read more
Problems with WP 6.1.1 and the get_user_meta() function
I am using this within a plugin, but it can be used within your theme’s function file. // Create field to track users’ comments numbers function display_educadme_user_comments_number($user_id) { if( is_user_logged_in() ) { global $wpdb; $user_comments_number = $wpdb->get_var(‘SELECT COUNT(comment_ID) FROM ‘ . $wpdb->comments. ‘ WHERE comment_author_email = “‘ . get_comment_author_email() . ‘”‘); ?> <h3><?php _e(‘Participation in … Read more