Home › Forums › Gutenberg › wp_insert_post() and add acf blocks to the page › Reply To: wp_insert_post() and add acf blocks to the page
I was able to add a block WITHOUT content. The issue was that instead of “acf:my-example-block” I needed to write “wp:acf/my-example-block”. However I am not able to put any content to the block generated. The content needs to go to the acf fields of the block. Any tips on this?
I have tried this without success:
<!– wp:acf/my-example-block {“data”:{“content”:”here is some content to the acf field”}}–>
<!– /wp:acf/tt-block-content –>’
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.