[Support request] Insert an item at the end of the articles

Home Forums Support [Support request] Insert an item at the end of the articles

Home Forums Support Insert an item at the end of the articles

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #933743
    Daniele

    Hi, through the elements-hook function, it is possible to insert a code in all the articles, before the beginning of the article, selecting “after-entry-header” .. I would like to be able to insert also another code, immediately after the end of the article, I have tried in every way but this is not possible. How can I create a custom hook

    Thanks, Daniele.

    #933750
    Leo
    Staff
    Customer Support

    Hi there,

    Not quite sure if I fully understand.

    Are we talking about single posts?
    https://docs.generatepress.com/article/hooks-visual-guide/#single-post

    What code are you trying to insert?

    #933861
    Daniele

    Hi Leo,
    yes, single posts, I would like to insert a banner, through a css code, immediately after the end of the article. not after the main, but inside, under the gallery of images that I insert at the end of the articles .. but I have tested all the predefined positions, but the one I want is not present ..

    #933867
    Leo
    Staff
    Customer Support
    #934463
    Daniele

    Thanks Leo, I tried how you suggested, it works, but the content is inserted at the bottom, after the links to categories and tags, I would like it to be inserted immediately after the article, at the end of the text. Before linking to categories and tags .. but maybe I ask too much, in this case I will insert the code in each article, in the exact position 🙂

    #934533
    David
    Staff
    Customer Support

    Hi there,

    if you use the generate_after_entry_content hook as Leo suggests then reduce the Priority to zero it will display before the footer meta.

    #934729
    Daniele

    Hi David, thank you, I set the priority to 0 and now it positions itself right where I want! Your theme is really great, and also your assistance .. thank you 1000 !!!

    Daniele

    #934735
    David
    Staff
    Customer Support

    Glad we could be of help – and happy to hear you’re enjoying the theme

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