Home › Forums › Calendar Products › Events Calendar PRO › Separate Time and Date
- This topic has 10 replies, 5 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
July 26, 2012 at 7:41 am #22786
raindance
ParticipantI want to separate the time and date so that they display as two separate fields on the event page. So ideally:
Starts: July 26, 2012
From: 6:30pm to 9pm
Is there any straightforward way of doing this I’m missing? If not, what files will I need to modify to do this?
Any help much appreciated.July 27, 2012 at 9:43 am #22836Rob
MemberHey Christian. This is an interesting request; while it isn’t something I’m positive on how to do, I think there is a way to make it work. Let me get our developer Paul – more well-versed in such issues than myself – to take a look and try and point you in the right direction.
Stay tuned and thanks for your patience so far.
July 31, 2012 at 3:33 pm #23020moderntribe
ParticipantHi, Christian!
Unfortunately, you would be able to format the date as you’d like using tribe_get_start_date(), except for the fact that we currently don’t have a filter at that part of the events page. Is that something you would be interested in having for future releases? It wouldn’t be too hard for us to add such a filter, if it’s something you think you’d use. Let us know! Thanks for using The Events Calendar
July 31, 2012 at 3:37 pm #23021moderntribe
ParticipantI forgot one exception; if you overwrite the single.php for events (by placing a single.php in an events subdirectory of your theme directory) you would be able to design the single event page however you liked, and could use tribe_get_start_date() in order to format the dates however you saw fit. Let me know if that doesn’t make sense (and see https://theeventscalendar.com/support/documentation/events-calendar-themers-guide/ for a more in-depth guide to the overrides).
August 1, 2012 at 3:33 am #23040raindance
ParticipantMany thanks. I’ve already made several changes to the single.php file. What do I need to put to format the time differently?
Something to do with this?
I think it would definitely be worth adding to future releases. Just looks a bit nicer in my opinion.August 1, 2012 at 3:35 am #23041raindance
ParticipantCan’t paste code apparently… This is what I tried to paste: tribe_get_start_date( null, false, ‘Y-m-d-h:i:s’
August 1, 2012 at 6:31 pm #23088Rob
MemberHey Christian. Thanks for the heads up; not sure if Paul saw your response, but I’ve asked him to take another look. Stay tuned on that end.
Regarding code: unfortunately we don’t have a good method for this yet, but are working on it. In the interim feel free to use pastie.org or a similar service.
August 21, 2012 at 7:38 pm #23903Jonah
ParticipantHi Christian,
Make a copy of /wp-content/plugins/the-events-calendar/views/single.php and place in an ‘events’ folder in your theme. Then find lines 21-29 (the block of code dealing with the date/time and modify to something like this: https://gist.github.com/3421708
I hope that helps but let me know if you need anything else.
Regards,
JonahAugust 29, 2012 at 8:22 am #24284Rob
MemberHey Christian: just wanted to post here to check if you needed anything else, or if Jonah’s solution above did the trick. Can you confirm so we can close out the thread or follow-up as needed? Thanks!
September 6, 2012 at 9:51 am #24647Rob
MemberClosing this thread out due to inactivity. Christian, per my note above, please let us know in a new thread if this issue persists. Thanks!
July 7, 2015 at 6:26 am #977693Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Separate Time and Date’ is closed to new replies.
