Archived topic
Difference between hook element and the hook-type block element
1 reply · Started by Dawei on June 16, 2022
Hi GP team,
I am a premium user and a big fan of the elements.
I am a bit confused with the hook element and the "hook-type" block element. Can you please help me understand what is the key difference between these 2 elements?
Thanks,
David
Hi Dawei,
Both Hook Element and Hook type - Block Element allow you to hook to specific location in you website.
The main difference is that Hook type - Block Element allows you to use the WP Gutenberg Block Editor, and add various Blocks to different locations in your website.
On the other hand, hook elements allow you to add code like PHP, JS and CSS. You can also add HTML and Shortcodes through hook element, but this is also possible through an HTML block and a Shortcode Block in Block Elements.
For refererence,
Block Element - Hook: https://docs.generatepress.com/article/block-element-hook/
HooK Element: https://docs.generatepress.com/article/hooks-element-overview/
Hope this clarifies!