[Resolved] GP Hook Right After Content

Home Forums Support [Resolved] GP Hook Right After Content

Home Forums Support GP Hook Right After Content

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #326016
    Jam

    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

    #326063
    Jamal

    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/

    #326170
    Tom
    Lead Developer
    Lead Developer

    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.

    #327090
    Jam

    Thanks Jamal and Tom for the answers. I Have found a way to do it by using a different plugin — oh so many plugins!

    #327252
    Tom
    Lead Developer
    Lead Developer

    Glad you got it working 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.