Site logo

Archived topic

GP hooks to insert text above Jetpack Related images?

18 replies · Started by dale on November 27, 2017

Viewing posts 1–15 of 19

I have a text box that I currently have appear at the bottom of certain posts using PHP in GP hooks pasted in the After Content area under Appearance > GP hooks. But apparently Jetpack related posts and miscellaneous post meta at the bottom count as post meta.

Ideally, I'd like the text box to appear above Related Posts. I suppose that means I'd put it in Inside Content, but I'm not sure how to do that without breaking my posts.

Guidance?

Hi there,

The page you link doesn't exist? Can you double check?

Sorry. It should work now.

I'm not quite sure what am I looking at? Which text box?

The blue one below "Related Posts." It has a blue background and starts "About Submission Calls

Browse more submission calls or tips for writers. You can sort calls by payment rate: token, semi-professional, professional, or royalties. To get a weekly roundup of all my posts for writers, sign up here."

And I would put that in the "Inside Content" hook area?

Hmmm ... I think we might be using the same words to speak a different language.

Do you want me to take a screenshot of where I currently have the hook inserted? I have it inserted in the "after content" area.

Okay. But I don't see an After Entry Content hook space available in Appearance > GP hooks.

Oh, ok. In functions.php? Thanks!

Plugins filter the_content to add their elements, as they have no idea what theme you're using, and can't use hooks.

So filtering the content makes it so their elements display directly after the content, above any possible hook.

The only way to control the order is to prevent the plugin from automatically adding their elements, and manually placing their elements into GP Hooks along with your other stuff.

Hmmm, okay. So I'd need to write separate hooks for each thing—the desired text, the Jetpack related posts, and the post meta? It that's the case, it's probably above my skill level.

This archived topic is closed to new replies.