Archived topic
how to insert a hook between blocks
5 replies · Started by detanatar on August 18, 2020
How do I insert my own code (hook elements) between two Gutenberg constructor blocks?
Hi there,
You can't hook an Element into your existing content between blocks, unfortunately. Hooks only work where the code for the hooks exist, and that code can't exist inside the content you build.
Let me know if you need more info :)
Maybe there is an opportunity to include in the new version of gp-premium some code that I can add myself to an arbitrary place, the body of the WordPress page (by the Gutenberg block) (by the editor of the page, post, product)? And this code will output a hook?
Hi there,
there is a hacky way around this.
See this topic:
Thanks It works
You're welcome