Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save groupewibi/45f4e1e781470466f06e636ed7a230b8 to your computer and use it in GitHub Desktop.
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
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