Last active
May 25, 2019 18:01
-
-
Save groupewibi/45f4e1e781470466f06e636ed7a230b8 to your computer and use it in GitHub Desktop.
Changing the title and the label of the Title Post using ACF Form
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
function my_acf_prepare_field( $field ) { | |
if ( is_page('page-name') ) { | |
$field['label'] = "My new title"; | |
$field['instructions'] = "My new instruction"; | |
} | |
if ( $field ) { return $field; } else { exit; } | |
} | |
add_filter('acf/prepare_field/name=_post_title', 'my_acf_prepare_field'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment