I've got register plus installed on my site and its great however I was just wondering if there was a simple way to out put the custom fields data onto a page?
For exaple I have custom fields for Processor, Motherboard, Memory etc.. and would like to have them listed for each user on this page - http://www.obs-gsw.co.uk/v2/?page_id=8
Is this possible?
Try
//$user_id = set your user id here
$user = get_userdata($user_id);
echo "<pre>"; print_r($user); echo "</pre>";
echo 'processor value is: ' . $user->processor; //processor should be replaced by whatever meta_key is used with Register Plus Data
Also look through these threads:
http://wordpress.org/tags/register-plus
total newbie here!
Where would I put that, I assume not in the page editor?
ok managed to sort that out..
Now have it listing the info for myself - http://www.obs-gsw.co.uk/v2/?page_id=8 which is great
Just the next step to shove that in a loop, any suggestions?
Just the next step to shove that in a loop, any suggestions?
Shove that in what kind of loop?
This gets all users
$blogusers = get_users_of_blog();
if ($blogusers) {
foreach ($blogusers as $bloguser) {
$user = get_userdata($bloguser->user_id);
echo 'User ID ' . $user->ID . ' ' . $user->user_firstname . ' processor value ' . $user->processor;
}
}