Skip to content

Instantly share code, notes, and snippets.

@daronspence
Last active December 27, 2016 21:45
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 daronspence/3a2c31a58bd6df238faf to your computer and use it in GitHub Desktop.
Save daronspence/3a2c31a58bd6df238faf to your computer and use it in GitHub Desktop.
Show edit form for current user ACF data/
<?php
acf_form_head(); // Place this before wp_header();
$options = array(
'post_id' => 'user_'.$current_user->ID,
'field_groups' => array($form_group_ID), // $form_group_ID is the post id of the form group to show.
'submit_value' => 'Update Profile'
);
echo '<p>Your username is <b>'.$current_user->user_login.'</b>. This cannot be changed.</p>';
acf_form( $options ); // http://support.advancedcustomfields.com/forums/topic/front-end-and-custom-user-meta/
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment