Hi Emilie,
Thanks for following-up! I reviewed the code provided in past threads and it seems that the function tribe_get_maximum_cost is in fact providing the highest cost of all events. So there’s seems to be no error here, to get the max cost of the event you are viewing you’ll need to do the following:
Add this snippet to your theme functions.php file:
function tribe_get_max_cost_single ( ) {
$tribe_ecp = Tribe__Events__Main::instance();
$post_id = $tribe_ecp->postIdHelper( null );
$cost_utils = Tribe__Events__Cost_Utils::instance();
$costs = $cost_utils->get_event_costs( $post_id );
if ( ! $costs ) {
return '';
}
return tribe_format_currency( $cost_utils->get_maximum_cost( $costs ) );
}
Once that’s in place just go ahead and replace the previous code in the single-event.php for this one:
<span class="tribe-events-cost"><?php echo tribe_get_max_cost_single( ) ?></span>
Give it a try and let me know about it,
Best,
Nico