Home › Forums › General Issues › Automatically fill image field with post_thumbnail › Reply To: Automatically fill image field with post_thumbnail
Yes, you could put this in functions.php
The format shouldn’t matter. ACF stores the attachment ID as the field value no matter what you set it up do return.
Not sure, it looks like it should work. I will see if I can find some time to test it. Basically we car calling our function whenever the post is updated, grabbing the featured image id and stuffing it into the ACF field which is kinda why I’m confused as to why it doesn’t work (even though I didn’t test it before I posted it)
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.