Site logo

Archived topic

Add hook after content and before related posts

3 replies · Started by Sarah on September 29, 2019

Viewing posts 1–4 of 4

Hi, I've created a hook via Appearance > Elements to display a CTA at the end of every blog post for a client.

However, she would like it to appear after the content and before the related posts show via the plugin I am using - Related Posts Thumbnails by WPBrigade.

I have the option to automatically append to the post content or use the following snippet in The Loop <?php get_related_posts_thumbnails(); ?>

I'm not sure what to do or how to achieve the desired order of content. Can you help please?

Hi there,

you can create a second after_content hook and add the php snippet provided by the plugin, making sure you check execute PHP.

The Priorty number on the Hook Element will change a hooked functions position; 0 (zero) is at the top and larger numbers will move it down the display, so your second hook could be 15 for example

That worked a treat! So simple when you know how :)
Thank you David

Glad to be of help

This archived topic is closed to new replies.