Site logo

Archived topic

Custom Hook

3 replies · Started by Paul on October 18, 2018

Viewing posts 1–4 of 4

Hi,

I want to insert a line of HTML directly after the last paragraph on a post. I believe this should be possible using elements but can't find a hook for this location (the after_content hook places the banner underneath author box and next post info. I want it directly under the final paragraph) Do I need to make a custom hook or is this kind of placement not possible?

Thanks

Hi there,

the generate_after_entry_content hook will add it before the entry-meta ( post nav and terms ). this Topic explains hook priority to move elements up the order:

https://generatepress.com/forums/topic/hook-after-entry-content-and-before-entry-meta-in-post/#post-630419

However it looks like your author box and shares are being filtered into the content. Which means they will appear above it. So if possible they should be hooked into the same hook.

So if possible they should be hooked into the same hook.

Not sure how to do this, they are inserted via plugins.

Do the plugins provide an option to insert as a shortcode or PHP?

This archived topic is closed to new replies.