How do I add HTML to custom post type template based on logic?

by vegemite4me   Last Updated October 19, 2019 22:08 PM - source

I am using CMB2 to create a custom post type called event. This custom type has a field called 'Event Date' which is of type text_date_timestamp.

When a user goes to an event page, I need the page to show a big 'Book Ticket' button if the current date is before the event's date.

How can I change the template file (single-event.php) so that this button is show below the main content?

Related Questions

Drag and drop template builder

Updated April 30, 2015 21:03 PM

Get image URL from media library in input

Updated June 13, 2015 01:03 AM

Custom post type with two templates

Updated April 25, 2016 08:03 AM