Created
March 20, 2017 12:01
-
-
Save solid-pixel/734476b20afdb819b8240a6588782836 to your computer and use it in GitHub Desktop.
Prefill ACF field with Post Title
This file contains hidden or 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_load_value( $value, $post_id, $field ) { $value = get_the_title(); return $value; } add_filter('acf/load_value/name=FIELD_NAME', 'my_acf_load_value', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment