Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter mobnew

    (@mobnew)

    I would have to guess there is a better way, but for now I have found adding the following to the start of the above function works:

    global $wpdb;
    $user_ID = get_current_user_id();
    
    $company = $wpdb->get_row("SELECT * from wp_usermeta WHERE user_id='".$user_ID."' AND meta_key='company'");

    And then adding value=”<?=$company->meta-value ?>” to the input.

    If there is a better or more efficient way to complete this, please let me know.

    Thank you,

    Plugin Author Ultimate Member

    (@ultimatemember)

    Try get_user_meta( $user_id, ‘field_key_here’, true );

    Thanks

    Thread Starter mobnew

    (@mobnew)

    Thank you. Much appreciated.

    Plugin Author Ultimate Member

    (@ultimatemember)

    You’re welcome.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Populate custom fields on account page’ is closed to new replies.