CPTs – saving data from core blocks to meta?
-
Really glad that we can create CPT templates containing custom blocks that will save data to post meta. https://www.ads-software.com/gutenberg/handbook/block-api/attributes/#meta
However! A lot of the time these fields are really basic (e.g. for a CPT ‘book’, think of text fields for author, genre, etc). It would seem overkill to create a custom block for each of these items – just so we can save the data to the right post meta field.
What would be the correct ‘Gutenberg’ way of doing this, given that porting custom fields to blocks is encouraged? Is there any way (without using ACF or similar) of creating lots of e.g. Paragraph blocks each saving to a different meta field?
The rational for doing this is to ensure we continue to save structured data, allowing us to pull specific items out and use them in places other than the single template file. Am I missing something here?
- The topic ‘CPTs – saving data from core blocks to meta?’ is closed to new replies.