Archived topic
GP Hook Right After Content
4 replies · Started by Jam on May 30, 2017
Hi
Is it possible to add a script/gp hook right after the article?
The only option I have from what I can see is the AFTER-Content hook. But then that puts the script right after everything within that container like the social media plugin, relation posts, etc.
What I need is for it to be right after the end of the article. (hope I'm making sense :-).
Is there a way to do this at all?
Thanks Tom
Hi
There is the generate_after_entry_content hook. Take a look here on how to use it https://docs.generatepress.com/article/using-hooks/
A lot of those plugins (social icons, related posts etc..) filter in their HTML into the actual content, meaning all hooks appear after them.
What you would have to do is ask the plugin developers if it's possible to use a function to hook them in, and disable the filtering.
That way you can choose what shows up first.
Thanks Jamal and Tom for the answers. I Have found a way to do it by using a different plugin --- oh so many plugins!
Glad you got it working :)