Last active
December 27, 2016 21:45
-
-
Save daronspence/3a2c31a58bd6df238faf to your computer and use it in GitHub Desktop.
Show edit form for current user ACF data/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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