2
votes

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?

1

1 Answers

0
votes

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