Skip to main content
Home / The Lodge / Building a Mobile-First WordPress-Powered Artists Website / #029 – Events Wrapup

#029 – Events Wrapup

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.

icon-link icon-logo-star icon-search icon-star