Archived topic
Adding a hook in-content
3 replies · Started by Gareth on July 26, 2021
Good Evening :)
I have created a hook element that advertises a digital product that I sell.
I want to be able to insert this in different places in various articles. What is the best / easiest way to inset this into articles?
Many Thanks,
Gaz
Hi Gareth,
Unfortunately, GP doesn't have Hooks that you can use inside an article.
If you are comfortable with codes, you can give Elvin's solution a try:
https://generatepress.com/forums/topic/hook-in-hook/#post-1636333
If not, the easiest way would be to save the ad as a reusable block, then you can add it to your post wherever you want.
Let me know if you need further assistance :)
Hello :)
How do I create a reusable block & add it into posts? Is it under generatepress > elements > block?
Thanks,
Gareth
Hi there,
Reusable Blocks are a core function.
This article shows how to use them:
https://wordpress.com/support/wordpress-editor/blocks/reusable-block/