Getting current user data wp_s2member_custom_fields
Posted: September 11th, 2011, 8:27 pm
I have been using the code below to get the current user zip code from the wp_usermeta, when I used a plugin called, Extra User Details.
<?php
global $current_user;
get_currentuserinfo();
$replace=$current_user->zip;
echo "$replace";
?>
I have installed s2Member and want to use it for my registration on my site, but it places the zip in a field called wp_s2member_custom_fields, with several of the custom fields, instead of placing it in a field by itself, is there a way I can extract the zip code from this field and use it as the current user zip. Or if not is there a way I can force it to place the zip in a single field, like it does first name and last name. I use the "$replace", in another plugin called Hungryfeed to display a RSS feed based on the zipcode of the user that is logged in.
<?php
global $current_user;
get_currentuserinfo();
$replace=$current_user->zip;
echo "$replace";
?>
I have installed s2Member and want to use it for my registration on my site, but it places the zip in a field called wp_s2member_custom_fields, with several of the custom fields, instead of placing it in a field by itself, is there a way I can extract the zip code from this field and use it as the current user zip. Or if not is there a way I can force it to place the zip in a single field, like it does first name and last name. I use the "$replace", in another plugin called Hungryfeed to display a RSS feed based on the zipcode of the user that is logged in.