Forum Replies Created
-
AuthorPosts
-
Marianne Steiner
ParticipantHello András
It would probably help but I solved it the pragmatic way and just created a new custom field and have the content editor copy & paste the contents from one field to the other. Or using the new field exclusively for this additional information that is used on a third website.
It’s fully working now and “documented” (with links to the threads here on https://github.com/zu/Avada-Child-Theme)
Marianne Steiner
ParticipantThanks for the information.
I think this is true, but
Recurrence Description, Use this field if you want to override the auto-generated descriptions of event recurrence
So
"description": nullwill transformed with some “black magic” or the like, but if a description is there, that would be used, I guess.So there must be a way to hook into that data to add it to the JSON feed or copy it to a custom field, but it propably would need some very dark black magic.
So thanks András.
This means I will create a new custom field and have the editors copy the text from the “Recurrence Description:” field to paste it in that new custom field.
It’s not a very nice solution, but feasible.
Marianne Steiner
ParticipantNow I have one problem left:
How can I output the “Recurrence Description field in JSON feed“?I opened a separate topics for this so that I can close this thread since I couldn’t find any hint in the documentation.
-
This reply was modified 8 years ago by
Marianne Steiner.
Marianne Steiner
ParticipantThanks very much Victor and Jacqui
I was able to figure it out with your hints and help.
It works as expected like this, composing your answers:
// this filter adds the custom field values to the json output add_filter( 'tribe_rest_event_data', 'sp_add_event_customfields' ); function sp_add_event_customfields($data) { $event_id = $data['id']; $data = array_merge( $data, array("custom_fields" => array( 'price' => get_post_meta( $event_id, '_ecp_custom_2', true ), '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 ), ) )); return $data; }Marianne Steiner
ParticipantThanks very much.
I have version 4.6.13 of The Events Calendar and version of 4.4.24.2 of The Events Calendar PRO
Sadly the code gives an error:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function sp_add_custom_fields(), 1 passed in /app/public/wp-includes/class-wp-hook.php on line 288 and exactly 2 expected in /app/public/wp-content/themes/Avada-Child-Theme/functions.php:42 Stack trace: #0 /app/public/wp-includes/class-wp-hook.php(288): sp_add_custom_fields(Array) #1 /app/public/wp-includes/plugin.php(203): WP_Hook->apply_filters(Array, Array) #2 /app/public/wp-content/plugins/the-events-calendar/src/Tribe/REST/V1/Post_Repository.php(148): apply_filters('tribe_rest_even...', Array, Object(WP_Post)) #3 /app/public/wp-content/plugins/the-events-calendar/src/Tribe/REST/V1/Endpoints/Archive_Event.php(164): Tribe__Events__REST__V1__Post_Repository->get_event_data(5433) #4 /app/public/wp-includes/rest-api/class-wp-rest-server.php(936): Tribe__Events__REST__V1__Endpoints__Archive_Event->get(Object(WP_REST_Request)) #5 /app/public/wp-includes/rest-api/class-wp-rest-server.php(321): WP_REST_Server->dispatch(Object(WP_REST_Request)) #6 /app/public/wp-in in /app/public/wp-content/themes/Avada-Child-Theme/functions.php on line 42I guess it’s a silly typo kind of an error, but just can’t see it now.
I will have a look at it during day time (it’s after midnight now) but if you see it right away, I’d be happy with any hints 😉
Thanks again.
We’re getting closer, that’s for sure!
Marianne Steiner
ParticipantThank you Victor
I think, this could help a lot.
We consume the JSON feed on another website where only future events will be shown.
This means that the parent or siblings of a course are not shown.So when I have a course like
http://elternbildung-aargau.ch/event/starke-eltern-starke-kinder-aufbaukurs-0-3-jahre/2018-04-14/
I can link to the parent and all with:
http://elternbildung-aargau.ch/event/starke-eltern-starke-kinder-aufbaukurs-0-3-jahre/ or
http://elternbildung-aargau.ch/event/starke-eltern-starke-kinder-aufbaukurs-0-3-jahre/all/ respectivelyI guess that can get us much closer to what we want.
I will check this out during business hours tomorrow.
Marianne Steiner
ParticipantThank you, Jaime, I know how to sort events in the backend. My clients would like to do when they use the submissionform in the frontend. They would like to sort by Title and or date. Is this possible some way?
Marianne
Von meinem iPad gesendet
Marianne Steiner
ParticipantThe bug is fixed – thank you.
Marianne Steiner
ParticipantHi Courtney,
I just did the update and it’s working again – so I wasted time today! Thank you for the support. I’m going to bed now, here in Switzerland it’s dark night.
Marianne
Von meinem iPad gesendet
Marianne Steiner
ParticipantThis reply is private.
Marianne Steiner
ParticipantThis reply is private.
Marianne Steiner
ParticipantMeine Community kann ihre Events nicht mehr bearbeiten. Wenn sie einen neuen Event erstellen, können sie keine Serientermine eingeben. Ich bitte um sehr schnell Hilfe.
Es handelt sich um folgende Website: http://elternbildung-aargau.ch/events/community/addMarianne Steiner
ParticipantHoi Andras,
danke für die tollen Plugin-Hinweise. Ich kann sehr gut Widgets erstellen. Ich weiss jedoch nicht, wie ich diese der Seite http://elternbildung-aargau.ch/events/community/add zuordnen kann, weil die Seite ja ein externer Link ist, den der EventsCalendar generiert und den ich über das Menu in die Website einbinde. Ich kann http://elternbildung-aargau.ch/events/community/add nirgends anwählen oder anklicken.
Vielleicht verstehe ich aus etwas nicht richtig.
Danke für die Unterstützung
MarianneMarianne Steiner
ParticipantHi Shelby
Thank you very much for your help. It would be great, to have your advices translated in german.
Marianne Steiner
ParticipantHello,
I checked all the things you told me. The plugin is great but I cannot assign my new Sidebar to http://elternbildung-aargau.ch/events/community/addI also found out, how to customizing template files. But I don’t know what to write in witch template to assign a sidabar to http://elternbildung-aargau.ch/events/community/add.
I would be very glad to get some advice. It’s very hard to do this in english – I speak german.
Thank you -
This reply was modified 8 years ago by
-
AuthorPosts
