How do I remove the start and end times?

Home Forums Calendar Products Events Calendar PRO How do I remove the start and end times?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #45136
    jtmrochem
    Participant

    I want to be clear, I am not referring to the customization window that expands open under “Appearances” > “Plugins”. I am trying to disable the entire star/end time so that it does not show. All I need are the dates of each event, no need for start/end times.

    #45171
    Barry
    Member

    Hi there – so the first thing to do (if you haven’t already done so) is read up on theming The Events Calendar and template overrides.

    You’ll want to copy across and modify list.php to your theme’s events folder. Then, locate these lines in your custom version of list.php and remove them.

    That should remove the start/end date fields from the meta area on the upcoming events list page.

    #45750
    Steve
    Participant

    Hi Barry
    Just wondering how I remove only the end time?
    Thanks

    #45751
    Steve
    Participant

    and not necessarily just for list.php. Probably plugin wide, so for gridview, single.php, community events etc etc.
    Want to do a similar thing with the year.
    Cheers

    #45896
    Barry
    Member

    Hi Steve!

    Just wondering how I remove only the end time?

    So in the snippet I shared last time there are basically three blocks, each starting with <tr> and ending with </tr> – in this case you could try removing the middle block.

    and not necessarily just for list.php. Probably plugin wide, so for gridview, single.php, community events etc etc.

    So going back to the previous example, note that that middle block contains a bit of code reading echo tribe_get_end_date(); – that is your clue that it relates to the end date.

    While we can’t really guide you through making this change in each individual template the process is basically the same and so once again I’d recommend reading up on the same resources I provided in my initial post and taking things from there.

    Thanks!

    #45918
    jtmrochem
    Participant

    Where can I find list.php after I log in to the ftp?

    #45922
    Barry
    Member

    You should be able to find the original in wp-content/plugins/the-events-calendar/views. It’s worth bookmarking our Themer’s Guide – this section for instance summarizes the different folders you should look in and the role of the various different templates 🙂

    #46196
    Steve
    Participant

    “So in the snippet I shared last time there are basically three blocks, each starting with and ending with – in this case you could try removing the middle block.”

    This refers to the entire end date (incl time), not just the specific time itself.
    Is there a way to just remove the time?
    Thanks

    #46208
    Barry
    Member

    Hi Steve,

    There certainly is – if you can find the following piece of code (and the same pattern basically applies to tribe_get_start_date(), too):

    echo tribe_get_end_date()

    Then you just need to modify it slightly:

    echo tribe_get_end_date(null, false)

    And that should remove the time.

    #46220
    Steve
    Participant

    Great, thanks barry.
    Done it for all i.e. single , list and single venue. However, want to get rid of it too in the pop up in gridview.
    Thanks a lot

    #46234
    Barry
    Member

    Hi Steve,

    If you setup a custom table.php template you will see this code toward the bottom. Try amending it to this.

    Does that help?

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘How do I remove the start and end times?’ is closed to new replies.