My custom user metadata is only active for only admin but i want it to be active on all users especially customers
My custom user metadata is only active for only admin but i want it to be active on all users especially customers
My custom user metadata is only active for only admin but i want it to be active on all users especially customers
I solved my problem in another way(WPDB). I wrote a query for this purpose like below: $goal_posts = [31289,31422,77641,41289,21482,17641]; $sql = “SELECT * FROM wp_usermeta WHERE (meta_key = ‘saved_posts’) AND (“; $sql .= implode(” OR “, $goal_posts); $sql .= ‘) GROUP BY user_id’; global $wpdb; $users = $wpdb->get_results($sql);
What I understand from your question is that you want to: Count how many times the words inside a certain user meta field are repeated accross all the meta results for a query. One way to achieve this is to put all your meta values together into one string and then count the repeated words … Read more
How can I search user meta by a partial key name?
Can I add a unique code for each user based on the location?
Basically, I have ditched the function, and now update meta data with a click on a hyperlink. It fires this code, and does exactly what I wanted. In case anyone interested: $current_user = wp_get_current_user(); $current_user_id = $current_user->ID; $author_id = get_post_field( ‘post_author’, $post_id ); $user_coins = get_user_meta( $current_user_id, ‘usercoins’ , true ); $author_coins = get_user_meta( $author_id, … Read more
This is written on the assumption that this data will only be retrieved when the user ID is known, and always in full for that user. If any kind of filtering is needed, if you need to filter users themselves by this data, then this answer will no longer apply. One Row per User This … Read more
Change auth_cookie_expiration for specific roles and specific login times
How to display user_meta array as a table?
Reading additional fields in PMPro