I have an ace custom field group with one custom field – it shows up when adding/editing a post – I was hoping to use this field as a Gutenberg block – I followed the instructions to setup a block using ACF and I was using the same name for the custom field used previously – the field shows up in the backend however, I don’t seem to be able to get the data to show that was previously entered in the posts – do I have to re-enter all my data or is there a way convert the data previously entered?
Hi mmjaeger, As far as I know Blocks save their content within . the Post Object itself, here’s a snippet from the original ACF Blocks blog post:
Metaboxes save data as “meta” (individual bits of data connected to the post via the wp_postmeta table) which allows the developer full control over when and where they appear within the theme template files – perfect for bespoke websites.
Blocks save their data within the post_content value (as JSON within HTML comments) which allows the user full control over when and where they appear within the post’s content – perfect for blog posts or rich content areas.
Basically means the content from your original Custom Field setup won’t show in your new block as it’s in a different place.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users