When using multiple tickets with Event Tickets and Event Tickets Plus, the price will display as a range. However, there may be instances in which you’d like to show only one of the prices.

This may come up with early bird pricing or a hidden ticket, where you’d only like to show one of the prices at a time. The good news is that we’ve got a snippet to help you out with this customization.

Remove the cost range

Add the following snippet to your theme’s functions.php file.

Choose whether you want to show the lowest price (maybe with some text) or the highest price only. Delete the unwanted block of code.

function tec_remove_price_range( $cost, $post_id, $with_currency_symbol ) {

	$pieces = explode( ' – ', $cost );

	// Remove the block you don't need!

	// To show the lowest price with some text.
	if ( ! empty( $pieces[0] ) ) {
		return "Starting from " . $pieces[0];
	}

	// To show the highest price.
	if ( ! empty( $pieces[1] ) ) {
		return $pieces[1];
	}

	// If not a range then return the default value.
	return $cost;
}

add_filter( 'tribe_get_cost', 'tec_remove_price_range', 10, 3 );