Intermittent problem writing update_user_meta
Intermittent problem writing update_user_meta
Intermittent problem writing update_user_meta
I don’t think this can be cleanly expressed in WP query API. YOu can query for posts matching all of terms in a set or any of terms in a set, but there is no concept of how many terms matched. You would need to write either: Very custom SQL for the query you want … Read more
WordPress already has a url structure for Author information. If you have pretty Permalinks enabled, the URL should read like http://www.website.com/author/username . You can make a new template file named author.php in your theme to manipulate what is shown on this page (add meta information and whatnot). You can get the author id in the … Read more
when you use add_post_meta with the argument $unique = TRUE and the meta already exist, the value is not changed https://codex.wordpress.org/Function_Reference/add_post_meta If you want to update a meta, use update_post_meta update_post_meta($post_id, ‘wpcf-branch-order’, $branch);
REST_query_vars for users
There is one small issue. You have to user ‘IN’ instead of = because you want to check values with array $args = array( ‘role’ => ‘candidate’, ‘meta_query’ => array( ‘relation’ => ‘AND’, array( ‘key’ => ‘as_skills’, ‘value’ => array(‘skilla’,’skillx’,’skille’), ‘compare’ => ‘IN’ ), ), ); $test = get_users($args); echo “<pre>”; print_r($test); echo “</pre>”;
You may update your query like this : get_users( array( ‘number’ => 1, ‘count_total’ => false, ‘meta_query’=> array( array( ‘key’ => ‘egt_session_key’, ‘compare’ => ‘=’, ‘value’ => ‘some_custom_field_data’ ) ) ) )
I figured it out, completely accidentally. I had already tried the solutions posted but they did not work for me, most likely due to the theme I am using (TravelTour). For me, to get the user meta to display I had to call wp_reset_query before it. I have no idea why. Example: wp_reset_query(); // then … Read more
I solved this by editing the plugin files. Not ideal, but when the plugin author ignores your emails and forum posts it’s what I had to do (I have paid for the pro version…). In the rare case that this may help someone else, in UserInsert.php I added the filter $userData = apply_filters(‘user_meta_pre_user_register’, $userData); before … Read more
Look like you need used hook user_register it’s return to you user id, after that you can save it in DB.