Skip to:
Content
Pages
Categories
Search
Top
Bottom

Pulling from existing custom fields

Viewing 3 replies - 1 through 3 (of 3 total)
  • Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Hi @compixonline

    get_user_meta() will allow you to retrieve the custom field data. You’d use the function like this:

    $data = get_user_meta( $user_id, $key, true ); where $key is the name of the custom field and $user_id is the user ID of your BuddyPress member.

    $data will then hold the custom field value you want for that particular member.

    Ref: https://codex.wordpress.org/Function_Reference/get_user_meta

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    [off-topic]

    @henrywright – can you ping me via the addy in my profile? thanks.

    Profile photo of compixonline
    compixonline
    Participant

    @compixonline

    Hi –

    I really appreciate your reply… it’s a little above my head but working on it. How would you then populate the buddypress Xprofile fields (which would be the same, say user_meta is occupation I would have a BP Xprofile field “occupation” and I’d want to copy it across.

    I’d also want to hide the ability to change that field in the BP members profile, forcing them to use the Membermouse field in order to change their occupation both in the Membermouse Table and their BP profile…

    Hope you can help! Many thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pulling from existing custom fields’ is closed to new replies.
Skip to toolbar