• Resolved ImageStanislav Khromov

    (@khromov)


    πŸ‘‹ Hi! Would it be possible to add to the documentation how to register blocks programmatically? I’m imagining a workflow where developers build blocks in the UI, export them to JSON and this JSON could then be registered programmatically (or automatically, similar to ACF Local JSON)

    Would really help when you are making custom projects and want to put the blocks in code rather than in the database.

Viewing 1 replies (of 1 total)
  • Plugin Author ImagenK

    (@nko)

    Hey.

    Unfortunately, it is not possible to use JSON in the way as it works in the ACF plugin. You can only export the block to PHP and add this PHP code in your theme or in a plugin. Look at the “Generate PHP” here – https://lazyblocks.com/documentation/export-blocks/

    Regards, nK.

Viewing 1 replies (of 1 total)

The topic ‘Register blocks programmatically’ is closed to new replies.