Separate Date and Time into 2 lines for Single Day Events for single.php

Home Forums Calendar Products Events Calendar PRO Separate Date and Time into 2 lines for Single Day Events for single.php

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #30568
    Elizabeth
    Participant

    I’m using the Events Calendar Pro for a client who only has single day events. On the single event view page I would like to show the date on two lines like this:
    Date: January, 15, 2013
    Time: 6:30pm-7:30pm

    Is there a way for me to edit the single.php file to accomplish this?

    #30570
    Jonah
    Participant

    Hi Elizabeth,

    Sure there is. First, make a copy of /wp-content/plugins/the-events-calendar/views/single.php and place in an ‘events’ folder in your active theme. Then find lines 22-23 and replace with something like this: http://snippi.com/s/6wje59r – this will only affect the start date/time, you’ll need to figure out what you want to do with the end date/time. If you want to change the date/time format just checkout the PHP documentation on date format: http://php.net/manual/en/function.date.php

    I hope that helps!

    – Jonah

    #30583
    Elizabeth
    Participant

    Thank you Jonah, this helped quite a bit. I haven’t been able to get the date or time formatting to take though. Would you mind taking a look?
    http://snippi.com/s/t62eh8s

    #30584
    Elizabeth
    Participant

    I just saw my mistake with the date formatting – I didn’t repeat the same string in the php command. It is working perfectly now!
    Thank you again for your help and very fast reply!

    #30589
    Jonah
    Participant

    No problem Elizabeth, glad you figured it out. Let us know if you need anything else.

    – Jonah

    #978408
    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 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Separate Date and Time into 2 lines for Single Day Events for single.php’ is closed to new replies.