cliffordp
3/12/2018 - 6:51 PM

Events Calendar PRO: Output Additional Fields meta information on Day View.

Events Calendar PRO: Output Additional Fields meta information on Day View.

<?php

/**
 * Events Calendar PRO: Output Additional Fields meta information on Day View.
 *
 * @link https://gist.github.com/cliffordp/5e7d6c6ca9dd91d1bf2b8090e8e26333
 * @link https://theeventscalendar.com/support/forums/topic/get-extra-fields-in-day-view/
 */
function cliff_tec_pro_additional_fields_on_day_view() {
	if (
		! function_exists( 'tribe_is_day' )
		|| ! tribe_is_day()
		|| ! method_exists( 'Tribe__Events__Pro__Single_Event_Meta', 'additional_fields' )
	) {
		return;
	}

	$pro_single_meta = new Tribe__Events__Pro__Single_Event_Meta;
	$pro_single_meta->additional_fields();
}

add_action( 'tribe_events_after_the_content', 'cliff_tec_pro_additional_fields_on_day_view', 50 );