I would like to ask you for very specific integration between ACF Block fields, ACF Blocks and Bricks section template Shortcodes.
Usually, I create my ACF Block template manually with HTML + CSS. However, I would love to create my Blocks in Bricks and then display Block ACF fields data in Bricks template (for example section template).
How can I query the block fields? For each block, I use this structure:
- block.json - register block css and template and name, category, capabilities etc.
- block.php - get ACF block fields and save their values to the $data variable, get block ID and create CSS classes
- template.php - the HTML structure of block with echoes of data in $data variable
- block.css - CSS
I can add the Bricks template shortcode into the template.php but I am not able to echo any $data[‘acf_block_field’] in the Bricks template.
How can I “parse” the blocks $data to the Bricks template? Is it possible? Do you have some idea how to do that?