In this code:
if ($gender == 'his_Male') {
$wpgender="Male";
} elseif ($gender="her_Female") {
$wpgender="Female";
} else {
$wpgender="Other";
}
You’re not comparing $gender
to 'her_Female'
, you’re setting it to 'her_Female'
:
} elseif ($gender="her_Female") {
You should be using ==
or ===
(preferably ===
, the difference is documented here).
Your second question is really a chrome-php issue, and not really on topic here. However, I would wager issue is likely that the xprofile_updated_profile
hook is not run at a time that could log anything to the console while you were looking at it. You would be better off logging any debug information you need to a file. error_log()
is the most straightforward method, but there are libraries out there that could also help.
Related Posts:
- user_login vs. user_nicename
- get_user_meta() doesn’t include user email?
- Automatically delete inactive users after 2 months
- How to display custom user meta from registration in backend?
- Allowing an email as the username?
- Grouping users under parent user
- How to order users alphabetically by their last name?
- Extending WP_User class and using this sub-class during the whole lifecycle
- Wp_User_Query not sorting by meta key
- How we can get the user id by its display_name
- WP_User_Query with combined meta query – not working?
- How to use hyperdb to separate and share a user dataset between wordpress installs?
- LEFT JOIN, INNER OUTER JOIN, LEFT OUTER JOIN is driving me crazy. Please help?
- \WP_User Object | What’s the Difference Between {caps} and {allcaps}?
- Show Biographical Info while creating new user
- include user profiles in search results?
- How to add follow functionality to multi-author wordpress site?
- Search multiple meta keys at once
- Plugin that would allow WordPress Authors to “follow” other Authors and query “Activity Info” from that
- User profile custom field
- Front end user meta options for users
- ACF Upload Image in front-end with custom form
- Hide a user from WordPress
- Drop down list in user profile page
- Check for user meta data at Login
- Searchable meta value in user.php
- How to add country drop down menu to the user profile?
- Delete user from frontend
- Add custom fields to the user profile
- Memory usage for scalable usermeta queries
- stop login if user_status equal zero
- WP User Query fails when searching meta queries and search columns
- Log all users out of all locations after 24 hours
- How can i create an array user meta?
- How to set show admin bar front to true for all users?
- Add user data to table when user is created?
- User Last Login Sort Column
- Updating user meta
- Are User Levels Still Currently Used?
- Search Users base on meta_value & meta_key
- mysql query two database tables, users and usermeta and sort by custom meta int value
- Updating wp_user_level on user update
- Should I encrypt the response that triggers an Ajax action? Is nonce sufficient?
- User Meta Data in a Sortable Table
- get_user_meta an ID for multiple functions
- How can I attach a user to another user with user meta
- Column Sorting Code on users.php
- Creating user without username and password
- List users by meta_key and meta_value
- Is this code true or not
- users and usermeta table
- WordPress SQL Issue not returning correct reselts
- User description only displayed for logged user
- The Simple and Correct Way to Add User Meta
- “the_author_meta(‘url’)” not working inside “href”
- Assign random (and unique) user meta upon registration
- Display the line breaks in user bio without using html
- how to set default update_user_meta values wordpress
- Get user by meta key – WP multi site
- Add custom user meta data
- Cannot Update user meta in custom field
- Can I Create a Second Admin Level User Role?
- How to add an attribute to a user?
- Adding fields to the “Add New User” but the form data not saved into DB
- New User Save Filter
- SELECT from wp_users, get Displayname too
- Assigning multiple or additional capabilities to specific users or how to create additional roles like bbpress roles?
- User Meta stuff
- What does “link” refer to when you delete a user?
- delete_user_meta from a foreach results page
- How do I update user email from frontend input field?
- Reading additional fields in PMPro
- Can I add a unique code for each user based on the location?
- Getting user data via ajax
- Get UserInfo from WordPress
- How can i add user display name drop down menu in frontend?
- How to prevent multiple user accounts with the same meta field?
- How to Moderate Edits to User Profiles?
- Safely changing UserID’s, re-using deleted UserID’s and automatically using deleted userID’s instead of an increment
- REST_query_vars for users
- In admin manage users page, how can I stop users with certain privileges from editing users with other privileges?
- Get meta key with value for user
- user and usermeta table not found
- UserMeta Changes Meta Value for Post ID
- Store extra user values permanently
- Add method for tracking who referred new users
- Username has been exposed
- User management missing after migration to new host
- Creating Custom user type just like custom post
- Validate user meta and redirect
- Let admin users edit member profiles from front end
- Does WordPress Need BuddyPress to Handle Large Amounts of Users?
- Sort users by custom user meta value
- Using and saving custom dropdown boxes on user profiles
- Store subscription details for users in WordPress
- How to add custom detail page for a Subscriber at Admin Panel
- Add custom input field in new user page
- WordPress – Security Question at Login from User’s Meta Data
- How can I list users by date in an array in meta_value?
- Export user data from Squirrly’s Starbox plugin?