'How to use a Wordpress Gutenberg block programmatically into the theme?

I'm developing a wordpress theme 100% based on Gutenberg blocks. Some pages are built directly on the editor (eg. home page), but other pages (eg. search results) need to be coded.

I want to show my search results using a post grid block, for example.

Is it possible to call a Gutenberg block programmatically, i.e, on my theme code, sending parameters and getting the html code back? As we do with do_shortcode(), for example?



Solution 1:[1]

It depends on the type of the block you are interested in, most of them are written and rendered entirely in JavaScript - have a look at the Block Editor Handbook and Dynamic Blocks

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 DOBss