Hi,
I’m using “Event Calendar Newsletter” plugin to send events with Mailchimp.
I’m trying to customize my newsletter layout by adding Event Type Color.
As you can see here, Event Calendar Newsletter provide a way to add custom fields: https://eventcalendarnewsletter.com/add-custom-tags-event-calendar-newsletter/
But I don’t know how to get Event Type Color value. Just to let you understand better, here’s a working example to get Event Type Slug value:
function ecn_add_eventon_event_type_slug_data( $args ) {
// Use additional_data to store our extra data
if (!isset($args[‘additional_data’]))
$args[‘additional_data’] = array();
$args[‘additional_data’][‘event_type_slugs’] = implode(‘,’, wp_get_post_terms( get_the_ID(), ‘event_type’, array(‘fields’ => ‘slugs’)));
return $args;
}
add_filter( ‘ecn_create_calendar_event_args-eventon’, ‘ecn_add_eventon_event_type_slug_data’ );
The main part of code is this one:
args[‘additional_data’][‘event_type_slugs’] = implode(‘,’, wp_get_post_terms( get_the_ID(), ‘event_type’, array(‘fields’ => ‘slugs’)));
I need to do mostly the same, but with Event Type Color instead of Slug.
Can you please help me?
Thanks in advance!
Hello,
Please check https://docs.myeventon.com/documentations/event-post-meta-variables/
Instead ofevent_type please try evcal_event_color.
Hi, thank you for your answer!
But, if I understand correctly, “evcal_event_color” refers to single event color, right?
I would like to get “Event TYPE color”, not single event color.
Thanks again!
I am really sorry, thought you were referring to Event color. Unfortunately, we cannot provide support for customizations but please check the attached image. As you can see you need to use term_meta[et_color] in some way in order to get Event Type color.
You can also send us a customization job request by creating a new ticket in here and selecting Customization Request as the category.
Sorry, I can’t find the attached image you’re referring…
Thank you.
Please check my previous message.
Hi,
I may not have understood it correctly, and I apologize for it.
But I guess I don’t need a customization, I don’t need the whole function, I simply need to know how to get the “event type color” knowing the event ID.
Maybe I’m wrong, but I guess it shouldn’t be too hard for you… right?
Please check this guide https://docs.myeventon.com/documentations/taxonomies-eventon/ (Get Event’s Terms).