Custom Date/Time on Event Page

Home Forums Calendar Products Events Calendar PRO Custom Date/Time on Event Page

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #16566
    Patti
    Participant

    I 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 am

    Right 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!

    #16605
    Rob
    Member

    Hey 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.

    #16635
    Patti
    Participant

    I think I’ve got something almost worked out, but it’s pretty ugly. Hopefully he has something a bit more refined. 😉

    #16648
    Jonah
    Participant

    Hi 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

    #16734
    Patti
    Participant

    That’s almost the same as where I got to. Yours is much prettier, though. 😉

    Thank you!

    #16756
    Rob
    Member

    Thanks 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.

    #976330
    Support Droid
    Keymaster

    This 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.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Custom Date/Time on Event Page’ is closed to new replies.