Calling tribe_events_template_data() can result in a change to the $post global - gather single event data earlier to mitigate this (updates #31738)
Remove unused vars