Home › Forums › Gutenberg › Post Objects and get_field() in ACF Gutenberg Blocks › Reply To: Post Objects and get_field() in ACF Gutenberg Blocks
Alternatively you can use
get_the_ID();
To pull the post id, which does work when the post is published, but will not actually pull the Post ID for the preview. I’d love to figure out why or what that work-around is though.
It seems that throughout the Gutenberg Blocks, the ID is changed to the Block ID instead of housing the Post ID.
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.