Home › Forums › Calendar Products › Events Calendar PRO › Custom Date/Time on Event Page
- This topic has 6 replies, 4 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
March 9, 2012 at 6:24 pm #16566
Patti
ParticipantI apologize if this is in the forum already… I couldn’t find it.
Here’s what I would like to do – The event is March 9, 2012, 9:00 am to 11:00 am.
On the event page, I want it to show:
Date: March 9, 2012
Time: 9:00 am to 11:00 amRight now it’s showing two lines, “Start” & “End” with the the full date/time on each line.
I can see in the single.php template where it is, I’m just too cross eyed to figure out how to make it do what I want it to do!
March 12, 2012 at 11:22 am #16605Rob
MemberHey Patti. Thanks for the note; not seeing any past discussions on this here in the forum myself, so let me see what our dev Jonah can suggest when he hits the forums this afternoon.
March 12, 2012 at 2:00 pm #16635Patti
ParticipantI think I’ve got something almost worked out, but it’s pretty ugly. Hopefully he has something a bit more refined. 😉
March 12, 2012 at 9:17 pm #16648Jonah
ParticipantHi Patti, this should do it: https://gist.github.com/2026688 – just copy that in single.php for the whole date/time block that’s there now. Make sure you’re overriding single.php too by placing a copy in an ‘events’ folder in your theme 🙂
You’ll notice in the code that it will first check to see if the start time/end time are different and if they are, then it uses the first block of code displaying the event date and start time/end time like you wanted. Otherwise, if the times are equal (i.e. not set), then it will just display the date.
If you need to tweak the date/time any more, the PHP date() reference is great: http://php.net/manual/en/function.date.php
March 14, 2012 at 8:54 am #16734Patti
ParticipantThat’s almost the same as where I got to. Yours is much prettier, though. 😉
Thank you!
March 14, 2012 at 8:44 pm #16756Rob
MemberThanks Patti – so it sounds like you’re set, right? Let me know if not. Otherwise have a great evening and let us know what else we can do along these lines as you keep using the plugin.
July 6, 2015 at 5:00 pm #976330Support 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 ‘Custom Date/Time on Event Page’ is closed to new replies.
