Skip to content

Instantly share code, notes, and snippets.

@wpmark
Created December 6, 2014 11:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpmark/1e57902ba32a0f115db7 to your computer and use it in GitHub Desktop.
Save wpmark/1e57902ba32a0f115db7 to your computer and use it in GitHub Desktop.
Adding Fields to a WP Front End Profile Tab
<?php
function wpmark_add_profile_field( $fields ) {
$fields[] = array(
'id' => 'test_meta',
'label' => 'Test Meta',
'desc' => 'Describe your field here.',
'type' => 'select',
'options' => array(
array( 'value' => 'value1', 'name' => 'Name 1' ),
array( 'value' => 'value2', 'name' => 'Name 2' ),
),
'classes' => 'field-class',
);
return $fields;
}
add_filter( 'wpfep_fields_profile', 'wpmark_add_profile_field', 20 );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment