Home › Forums › Calendar Products › Events Calendar PRO › Recurrence Description field in JSON feed
- This topic has 5 replies, 2 voices, and was last updated 7 years, 11 months ago by
Marianne Steiner.
-
AuthorPosts
-
April 11, 2018 at 1:57 pm #1504811
Marianne Steiner
ParticipantHow can I output the Recurrence Description field in each recurring event in the JSON feed?
I tried the same way like custom fields (see: topic/custom-field-output-for-json-feed/, but that didn’t show up.
'Termine'=> get_post_meta( $recurrence[description], '_ecp_custom_16', true ),The result in the JSON is:
"Termine": falseThat’s somehat close, because it’s at least something.
This code I tried, showed nothing:
'Termine'=> get_post_meta( $event_id, 'recurrence-description', true ),"Termine" : ""Or would it be possible to autocopy the text from the Recurrence Description field into a custom field?
April 13, 2018 at 5:30 am #1506497Andras
KeymasterHi Marianne,
Thanks for your question.
The recurrence description is not saved like that as a metadata.
It is saved as a serialized data, which looks like something like this:
{ "rules": [ { "type": "Custom", "custom": { "interval": "1", "same-time": "yes", "type": "Daily" }, "end-type": "After", "end-count": "3", "EventStartDate": "2018-04-13 08:00:00", "EventEndDate": "2018-04-13 17:00:00" } ], "exclusions": [], "description": null }And the description is generated based on that on the fly with javaScript (and probably some black magic).
I’m sorry I cannot be more helpful on this one. Let me know if you have any further questions on this.
Cheers,
AndrasApril 15, 2018 at 11:29 am #1507706Marianne 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.
April 16, 2018 at 3:10 am #1507933Andras
KeymasterHello and Happy Monday,
Even if you have more rules set up (one weekly and then a custom because of February 29 or whatever, and then a monthly), that field will only show up once.
I can try to check if it would be possible to automatically copy the description of the first rule into that field if that helps. Let me know.
Cheers,
AndrasApril 20, 2018 at 1:18 am #1511869Marianne 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)
April 20, 2018 at 3:08 am #1511929Andras
KeymasterGreat Marianne, I’m happy to hear you found a workaround. Awesome!
Since this is marked resolved I am going to close this ticket, but if you need anything else related to this topic or another please create a new ticket and we’ll be happy to help.
Cheers,
AndrasPS: We’d be grateful if you would give us feedback on your satisfaction with support. Just click on one of the classy looking emojis below. 🙂 If you can spare a few words, that’s even better. Thanks!
PS2: If you like our plugins, and you didn’t yet do so 🙂 we would also be happy to receive a review in the wordpress.org repository. Much appreciated!
https://wordpress.org/support/view/plugin-reviews/the-events-calendar/
https://wordpress.org/support/view/plugin-reviews/event-tickets/ -
AuthorPosts
- The topic ‘Recurrence Description field in JSON feed’ is closed to new replies.
