Support

Home Forums Events Calendar Add-on Event Calendar Add-On Custom Fields

Event Calendar Add-On Custom Fields

Posted: February 9, 2023 at 9:37 am

Viewing 1 reply thread


eschwarz

February 9, 2023 at 9:37 am

I am looking for a way to add a custom field value to the event calendar view. I’d like to style the event based on an ACF select value. It could be a class that is added to the calendar item the displays. Any help would be appreciated.


Tony

  • Support Staff

February 9, 2023 at 11:23 am

Hi there,

The calendar filters each individual DateTime using:

FHEE__EE_Calendar__get_calendar_events__calendar_datetime

That is passed the EE_Datetime_In_Calendar object and the EE_Datetime object.

The EE_Datetime_In_Calendar object has an add_class() method so you can pull the event from the datetime within your filter, pull the ACF value using that and then use the above method to set an additional class.

Here is an example of doing something slightly similar:

https://gist.github.com/Pebblo/6d8d9bad97911f63f0a21f8872c10898

Viewing 1 reply thread

The support post ‘Event Calendar Add-On Custom Fields’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso