#029 – Events Wrapup

(Updated on )

I thought we could scoot by Events which what we talked about in the last video, but as I fleshed out the Events area enough code had to be written I thought it was worth a wrap-up video.

In some cases, we have to check for the presence of a custom field before outputting it. Namely if the field isn’t required. It may be best practice to do this all the time since the required-ness of a field may change. Anyway, you can test if any particular custom field has data in it like:

if (get_field("date_of_opening")) {
  // will be true and do this if there is data

Styling of events, as always, is handled in an partial (_events.scss), so it’s modular but still together.