Home › Forums › Calendar Products › Events Calendar PRO › custom fields and series data for list
- This topic has 3 replies, 2 voices, and was last updated 8 years ago by
Marianne Steiner.
-
AuthorPosts
-
March 10, 2018 at 8:21 am #1475482
Marianne Steiner
ParticipantI was able to follow the documentation below (Introduction to The Events Calendar REST API) to output additional custom fields with following code:
`// this filter adds the custom field values to the json output
add_filter( ‘tribe_rest_single_event_data’, ‘elternbildung_additional_data’ );function elternbildung_additional_data( array $event_data ) {
$event_id = $event_data[‘id’];$Referent = get_post_meta( $event_id, ‘_ecp_custom_3’, true );
$Details_Anmeldung = get_post_meta( $event_id, ‘_ecp_custom_4’, true );
$Fotorechte = get_post_meta( $event_id, ‘_ecp_custom_7’, true );
$Preis = get_post_meta( $event_id, ‘_ecp_custom_16’, true );$event_data[‘Referent’] = $Referent;
$event_data[‘Details_Anmeldung’] = $Details_Anmeldung;
$event_data[‘Fotorechte’] = $Fotorechte;
$event_data[‘Preis’] = $Preis;return $event_data;
}`This works ok but actually I need the information on the list (meaning here: http://elternbildung-aargau.ch/wp-json/tribe/events/v1/events not only here: http://elternbildung-aargau.ch/wp-json/tribe/events/v1/events/2248 (example)
Any hints how I could accomplish this?
The filter “tribe_rest_events_archive_data” seems to work somewhat but adds the a single event custom fields to the end instead of looping. Propably I just do it wrong, but need some help here.
Also I’d need to have the dates (and URL’s) of all single events within a series, but I can’t figure out how to get this.
E. g. http://elternbildung-aargau.ch/wp-json/tribe/events/v1/events/2248 is a series.
But how can I get the dates and urls of the single events listed?
Thanks for hints.
https://theeventscalendar.com/knowledgebase/introduction-events-calendar-rest-api/
March 12, 2018 at 12:47 pm #1476811Victor
MemberHi Marianne!
Thanks for getting in touch with us!
After reviewing your request this essentially looks like a custom development task and so is outside of our stated scope of support.
Even so, we’d love to help you if we can. We do need to prioritize requests from other customers right at this time but I’ll certainly flag this with the team and – although we can’t make any promises – if we have time and space to come back and help we’ll be happy to do so.
In the meantime, if there is any more information you can share (including mocks) that will help us to better understand what you are seeking please do feel free to add them to this ticket.
If you urgently need help with this, however, you may instead wish to consider working with a suitably skilled developer or designer who can offer the additional level of support you require.
Thanks!
April 3, 2018 at 9:35 am #1495503Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘custom fields and series data for list’ is closed to new replies.
