Content Template and Hooks

Hello, All -

I want to replace the default layout so I’ve created a block-based template. I’ve set the type to “Content Template” - so it replaces everything.

So far - so good.

The problem is I also want to add a block of php code via a hook - which pulls in a post gallery from a custom field. Typically I would hook this to “generate_after_content”. In this instance, however, it does not work - presumably because I am using the template outlined above.

How do I get a hook to follow a Content Template?


1 Like

Try the generate_after_do_template_part hook - in the hook element you may need to select the Custom Hook first

1 Like

Hi, David -

Thanks for coming back to me. I finally got it working in the end - but it was very hit-and-miss!