Support

Home Forums Event Espresso Premium Add code – to all registration/booking templates

Add code – to all registration/booking templates

Posted: March 6, 2016 at 11:33 am


calex

March 6, 2016 at 11:33 am

Hi, is there a hook that will let me add some code to every template in the registration/booking process?


Tony

  • Support Staff

March 7, 2016 at 3:36 am

Hi Calex,

It depends what it your trying to do.

Event Espresso loads most of the individual sections through their own individual templates, meaning that a single page can load multiple templates. I’m assuming you don’t want to add code to each individual template?

For example on the thank you page – http://take.ms/3w7oB

Each section highlighted there is part of an individual template.

If you let us know what it is your trying to do we can let you know if there is a hook available for it.


calex

March 7, 2016 at 3:47 am

Thanks Tony.

Yes, trying to avoid copying all of the templates over.

I want to inject a html banner at the bottom of every page in the booking process – It will just be a notice to users when they are buying and registering.

Positioning wont be a problem as it will be controlled absolutely by CSS – it just needs to be included.


Tony

  • Support Staff

March 7, 2016 at 4:00 am

Do you want it to continue to display on the thank you page, after they have finalized the registration?

There is the ‘AHEE__SPCO__reg_form_footer’ hook which runs just after the SPCO buttons – http://take.ms/jW45U

That’s just using:

function tw_ee_after_spco_output() {
	echo '<h1>Some custom HTML here</h1>';
}
add_action( 'AHEE__SPCO__reg_form_footer', 'tw_ee_after_spco_output' );

But you could also just add the banner within the registration-checkout page to achieve the same results for that. But if you also want it to be displayed on the thank you page, you can add that same function to the:

‘AHEE__thank_you_page_overview_template__bottom’

Or again add the content into the thank-you page itself.

The support post ‘Add code – to all registration/booking templates’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso