I was able to piece together some code to get this to work. Thank you for leading me in the right direction. Here is the full code if anyone else is interested.
add_filter('acf/load_field/name=custom_post_type_id', function($field) {
$id = get_the_ID();
$field['default_value'] = __($id, 'txtdomain');
return $field;
});
Like I said Im a novice. I placed this code in the functions file and dont see any change to the field when I go to the custom post type in wordpress custom_post_type_id = global $post;
I am a novice at ACF, and am not sure where to place the snippets of code you have suggested.
Did you ever figure this out? I’m having the same issue. Google Search is not helping.
Any word on this feature?
The shortcode seems to work inside any ACF fields but not inside any of the WordPress fields
Ive tried adding the post id, still wouldnt work.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.