Home › Forums › Gutenberg › Post Objects and get_field() in ACF Gutenberg Blocks › Reply To: Post Objects and get_field() in ACF Gutenberg Blocks
I am also experiencing this issue. If there isn’t an easy solution, I would rather have to use something like get_field('size', $block_id)
to get block data than have to use get_field('post_field', get_the_ID())
for a post field.
Or, if possible for ACF to hook into the setup_postdata()
to switch contexts back and forth. I don’t know how feasible that would be.
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.