Skip to content

Instantly share code, notes, and snippets.

@tripflex
Created May 14, 2014 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tripflex/6053f881a46c3b57e435 to your computer and use it in GitHub Desktop.
Save tripflex/6053f881a46c3b57e435 to your computer and use it in GitHub Desktop.
Pods form display/output user meta field (using label) when not added under User in Pods
$user = wp_get_current_user();
$pod = pods('user', $user->ID);
$out = $pod->form(array(
'first_name' => array(
'label' => 'First name',
'type' => 'text',
'options' => array(
'required' => true,
),
),
'last_name' => array(
'label' => 'Last name',
'type' => 'text',
'options' => array(
'required' => true,
),
),
'user_email',
'gsm',
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment