Removing times from list and single event view

Home Forums Calendar Products Events Calendar PRO Removing times from list and single event view

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #21171
    Rachel
    Member

    Hi I am trying to remove the time from the list view and single event view. I’ve consulted this doc: https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-date-functions/ but the only place I can see to make the edit is date.php… I did this as a template override but it doesn’t seem to have changed anything. Am I on the wrong track? Which is the file that I need to update to remove the times? Thanks in advance.

    #21225
    Jonah
    Participant

    Hi Rachel,

    The only files you can override are in /wp-content/plugins/the-events-calendar/views and /wp-content/plugins/events-calendar-pro/views

    For list view you’ll want to edit list.php and for single; single.php.

    Let me know if you need anything else with this.

    Cheers,
    Jonah

    #21229
    Rachel
    Member

    ok so based on the date functions I need to update this bit of code throughout:
    – and somehow get [bool $displayTime = false] in there. Are you able to help me with the correct syntax? I was able to do the other mods myself but this is beyond me. Thanks

    #21230
    Rachel
    Member

    hmm the php bit deleted itself.. this is the bit Im guessing I need to udpate: tribe_get_start_date()

    #21233
    Jonah
    Participant

    Hi Rachel,

    We have horrible code pasting in the forums, sorry about that. We’re working to improve it but it takes sort of a back burner to work on the plugin 🙂

    Yeah, so if you do something like this:

    tribe_get_start_date( null, false, 'F j, Y' );

    That will display the date without the time (just paste in the same for the end_date). And if you want to change the date format further you can pass in any valid PHP date/time values: http://php.net/manual/en/function.date.php

    Does that help?

    – Jonah

    #21240
    Rachel
    Member

    Ah.. got it… that worked a treat! thank you!

    #21249
    Jonah
    Participant

    Glad to hear Rachel, let us know if there’s anything else you need.

    – Jonah

    #977214
    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 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Removing times from list and single event view’ is closed to new replies.