Forums

Register Plus question (5 posts)

  1. Jam0r
    Member
    Posted 3 years ago #

    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?

  2. MichaelH
    Volunteer
    Posted 3 years ago #

    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

  3. Jam0r
    Member
    Posted 3 years ago #

    total newbie here!

    Where would I put that, I assume not in the page editor?

  4. Jam0r
    Member
    Posted 3 years ago #

    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?

  5. MichaelH
    Volunteer
    Posted 3 years ago #

    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;
    }
    }

Topic Closed

This topic has been closed to new replies.

About this Topic