- This topic has 5 replies, 2 voices, and was last updated 4 years, 4 months ago by
Leo.
-
AuthorPosts
-
June 17, 2021 at 7:04 am #1825309
Matthias
Hey, Tom and GeneratePress team,
I am creating a page hero for events generated by The Events Calendar. This is the hero:
http://staging.kukusta.de/veranstaltung/testprojekt-5/
Screenshot:
https://paste.pics/27fa1fa3396a941e428ad54828a10ab2And this is what’s in it:
<div style="text-align:center;"> <h1> {{post_title}} </h1> <p> {{custom_field._EventStartDate}} - {{custom_field._EventEndDate}} </p> </div>As you can see, I am using The Event Calendar’s custom field names (which are documented here) for start and end times. Now, I would like them to show up as:
23. Jul 16:00 – 23. Jul 17:00
Is there any way to format that output? TEC can do it, as you can see in the subheading when scrolling down.
June 17, 2021 at 9:08 am #1825624Leo
StaffCustomer SupportHi there,
The theme doesn’t handle the format of date and time.
Can you try modifying it here?
https://wordpress.org/support/article/settings-general-screen/#date-formatLet me know 🙂
June 17, 2021 at 10:42 am #1825740Matthias
Hey Leo, thanks for your quick reply. WordPress’s own date and time settings bear no effect on how The Event Calendar’s own dates and times are formatted. TEC does have its own settings for that, and they seem to work within TEC’s own default templates (you can see that when you scroll down on the event I linked).
The problem seems to be that when I use the template tag functionality that GP provides so I can put the contents of those TEC fields in the hero, that’s when I only seems to output the raw data stored in the database. Which leads me to believe that TEC itself has code that parses and formats that data, and that code won’t work outside TEC?
June 17, 2021 at 10:51 am #1825749Leo
StaffCustomer SupportThe problem seems to be that when I use the template tag functionality that GP provides so I can put the contents of those TEC fields in the hero
GP doesn’t add any template tags for TEC by default – I would assume that TEC is adding the custom fields.
Any chance you can check with their support team first?
Let me know if I’m missing something here 🙂
June 17, 2021 at 10:55 am #1825754Matthias
Hi Leo, yeah, I looked up the names of the custom field names that TEC uses on their own documentation and used the GP custom field name template tag to implement this one. I will check in with TEC support to see whether they can help.
June 17, 2021 at 10:56 am #1825756Leo
StaffCustomer SupportSounds good. Let me know 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.