Last active
December 8, 2016 21:55
-
-
Save joelstransky/3c16d82fca90972ea8e75452991d4857 to your computer and use it in GitHub Desktop.
Display a single ACF field form view
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 $field = get_field_object('field_123a456b78c90'); ?> |
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( array('post_id' => 'new_post', 'form' => false, 'fields' => array('field_123a456b78c90'))); ?> |
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 | |
$field = get_field_object('field_123a456b78c90'); | |
$field['value'] = null; | |
// alternatively you could call acf_render_field_wrap( $field ); to display the name and description as acf_form would | |
acf_render_field( $field ); | |
?> |
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 $field['value'] = null; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment