Update events.php

Added function the_events for a custom query