Support

Home Forums Event Espresso Premium Add text beneath Pricing for Events

Add text beneath Pricing for Events

Posted: March 20, 2016 at 7:41 pm

Viewing 3 reply threads


Daniel Samsel

March 20, 2016 at 7:41 pm

I would like to place the words, ALL SALES FINAL under or near the General Admission/Price of events.
I currently upgraded to EE4.4.86p
I did this in EE3 using child files in the uploads folder.
Where can I do this in EE4?


Tony

  • Support Staff

March 21, 2016 at 7:48 am

Hi Daniel,

There are lots of hooks throughout Event Espresso so you often do not need to move/edit full templates (although you can)

It depends on where exactly you want to output the content but you could use the ‘AHEE__ticket_selector_chart__template__before_ticket_selector’ hook like this:

function ee_display_before_ts() {
	echo "<p>ALL SALES FINAL</p>";
}
add_action( 'AHEE__ticket_selector_chart__template__before_ticket_selector', 'ee_display_before_ts' );

Which will add content just before the ticket selector – http://take.ms/ELPOX

Does that work?


Daniel Samsel

March 23, 2016 at 10:02 pm

Tony,
Thanks for the reply, but I’m not 100% sure what file I am to add this code. Is it in the EEA Ticketing pluing, EE4 Core files?
You’re gonna have to walk me through it my friend.
The image you supplied is what I’m trying to accomplish. Though the placement may need to change if the client doesn’t like it.
Thanks for the help.
I look forward to hearing back.


Tony

  • Support Staff

March 24, 2016 at 7:09 am

Please do not add any code to any of the Event Espresso files (core, ticketing etc), if you modify core files (core files being any of the plugin files from any add-on) we can not provide support as its no longer our code.

The idea of ‘Hooks’ within WordPress is to allow you to add/change functionality without the need to modify core files. Take a look here for more information:

https://www.smashingmagazine.com/2011/10/definitive-guide-wordpress-hooks/

So to answer you question you don’t add that code to any of the EE files 🙂

If you are using a child theme you can place that snippet within your child themes functions.php file.

If you are not using a child theme you’ll want to create a functions plugin (a plugin used for custom functions on the site), we have a guide to creating one of those here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Then you would add that snippet of code between:

/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */

and

/* Stop Adding Functions */

So you would end up with something like this:

https://gist.github.com/Pebblo/d83a63f46895aba48ae0

Viewing 3 reply threads

The support post ‘Add text beneath Pricing for Events’ 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