What is the function/filter/hook to display the event price? I have tried echo’ing $event->event_cost, but the price does not display. You can see this at:
I have a copy of ticket_details.template.php in my child theme and added “Price:” below the “Date” and “Time”. However, <?php echo $event->event_cost; ?> does not display anything. Please advise.
Correction to my previous post — I have a copy of content-espresso_events-datetimes.php in my child theme. I’ve added “Price:” below the “Date” and “Time”. However, <?php echo $event->event_cost; ?> does not display anything. Please advise.
It might help to explain that in EE4 one event can have multiple tickets, each with their own price. The same also applies to datetimes: There can be multiple tickets, each with their own price, assigned to one datetime.
example of usage for the espresso_events-datetimes.php template would be: echo espresso_event_tickets_available($post->ID, false, true);
Viewing 2 reply threads
The support post ‘PHP code to display price’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.