Nick Bacon
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: PHP to get user data based on email addressThankyou once again, that works well.
For you information, I am using Ultimate member plugin, and this plugin stores the user meta values to the wp_usermeta part of the database along with all the default user metadata, so it is easily looked up the same as default user metadata.
Forum: Developing with WordPress
In reply to: PHP to get user data based on email addressI have checked the database
Let’s work with the following
meta_key = age_group
meta_value = 56-65for the meta_valuethere is a dropdown box with 4 different age ranges to select from.
Obviously, this is coded completely wrong but it might show you what I am trying to do. There are many meta_keys in the profile and some have the same meta_value, so the code needs to use the key to get the value.
if ($user_info(age_group)->56-65 && $user(age_group)->56-65); {echo "You both are the same age group";}Forum: Developing with WordPress
In reply to: PHP to get user data based on email addressI have figured out the above question but can not work out how to work with form data with multiple options.
The profile will have options the user selects from, so in their profile, one question could be… DO YOU LIKE FOOTBALL. The choices are YES to play, YES to watch, No
So how can I get a statement “YOU BOTH LIKE FOOTBALL TO WATCH”, if both users have that option set in their profile, or YOU BOTH LIKE FOOTBALL but one likes to watch and the other likes to play.
Forum: Developing with WordPress
In reply to: PHP to get user data based on email addressAnother quick question.
Now that I can get data from 2 users and display them on screen. I would like to compare
So….
Current user data is fetched using “user_info and the other user is fetched using “user” in my phpif the current user is age_group = 18-29 and the other user is age_group = 18-29
if $user_info->age_group == $user->age_group { echo "Your ages match"; } else { echo "Your ages don't match"; }I have no idea how to write the code.
Forum: Developing with WordPress
In reply to: PHP to get user data based on email addressThankyou for your help. That works perfectly
Forum: Developing with WordPress
In reply to: PHP to get user data based on email addressThanks, I have looked at this before… I have tried again and got it to work on the admin account, but when switching users, it does not display changed the displayed data, it remains the same as the admin details.
We snippets work dynamically when using a plugin to add php into a page?
Forum: Fixing WordPress
In reply to: display current weeks posts from one category(“cat=3&year=$current_year&monthnum=$current_month&w=$current_week”);
Sorry meant to but this this, typed a $ instead of £.
Help please