X
117371

I'm using "Event Calendar Newsletter" plugin to send my events with mailchimp. I need help to get Event Type color value.

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!

BY: Matteo Pizzanelli - Mar 21,2019 AT 8:50AM - 6 years ago
    • Artem Mar 21,2019 AT 1:41PM - Posted 6 years ago - #117394

      Hello,

      Please check https://docs.myeventon.com/documentations/event-post-meta-variables/

      Instead ofevent_type please try evcal_event_color.

    • Matteo Pizzanelli Mar 25,2019 AT 3:27AM - Posted 6 years ago - #117588

      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!

    • Artem Mar 25,2019 AT 4:57AM - Posted 6 years ago - #117623

      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.

    • Matteo Pizzanelli Mar 25,2019 AT 5:23AM - Posted 6 years ago - #117633

      Sorry, I can’t find the attached image you’re referring…

      Thank you.

       

    • Artem Mar 25,2019 AT 12:27PM - Posted 6 years ago - #117682

    • Artem Mar 25,2019 AT 12:29PM - Posted 6 years ago - #117684

      Please check my previous message.

    • Matteo Pizzanelli Mar 26,2019 AT 1:28AM - Posted 6 years ago - #117763

      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?

    • Artem Mar 26,2019 AT 12:29PM - Posted 6 years ago - #117869

      Please check this guide https://docs.myeventon.com/documentations/taxonomies-eventon/ (Get Event’s Terms).

You must login to reply to this ticket

HelpDesk

Welcome to EventON helpdesk.

EventON is the #1 Best selling event calendar plugin for WordPress websites in envato marketplace.

Checkout EventON