The Events Calendar
[resolved] [patch] Hide end date in widget if equal to start date (9 posts)

  1. Bernhard Reiter
    Posted 3 years ago #

    Patch against 2.0.10 to only display end time in TEC widget if end date is equal begin date.

    (German) example:
    4. Februar 2013 19:00 – 22:00

    instead of previously
    4. Februar 2013 19:00 –
    4. Februar 2013 22:00


    Upstream inclusion, pleeease?

  2. Klangwerk
    Posted 3 years ago #

    Hallo Bernhard,

    ich habe bisher nur geringe Kenntnisse von WordPress. Wie kann ich das Patch anwenden? Ich habe versucht über Notepad die Veränderungen ein zu fügen. Leider ohne Erfolg.

    Für Tipps wäre ich sehr dankbar.


  3. Bernhard Reiter
    Posted 3 years ago #

    As per Klangwerk's request, here's another gist with both modified files in full length. Use the "View Raw" button on the right hand side to download. To apply the relevant changes, replace


    by the respective files found at that gist. Needless to say, use at your own risk. Note that this was done using 2.0.10, and that updating the plugin afterwards will override these changes (unless upstream developers decide to include them in future releases).

  4. Klangwerk
    Posted 3 years ago #

    Thanks! It works!

  5. bl59marie
    Posted 3 years ago #

    This helped me as well.

    A supplementary question: Is it possible to not show the word "full day" (heldag in swedish) when it is a full day event?

  6. Bernhard Reiter
    Posted 3 years ago #

    @bl59marie: Yes. In wp-content/plugins/the-events-calendar/views/events-list-load-widget-display.php, delete the lines that read

    if( $event->AllDay ) {
    				echo ' <small><em>('.__('All Day','tribe-events-calendar').')</em></small>';

    (should be lines 54-56).

  7. bl59marie
    Posted 3 years ago #

    Great! Thanks.

  8. Bernhard Reiter
    Posted 3 years ago #

    As the project that I'm customizing The Events Calendar for keeps growing, and the changes have become too numerous to keep track of easily, I've forked TEC's wordpress plugin subversion repo on GitHub. Both the above patch and a couple of others are currently commits in the goldhauben branch. Feel free to check them out!

    I might denote the ones that I believe are fit for upstream inclusion later by moving them to the master branch later (though I guess it's kinda obvious which ones are), or by creating individual branches to be able to polish them.

  9. Rob La Gatta
    Modern Tribe Support
    Plugin Author

    Posted 3 years ago #

    You're the man, Bernhard! I mentioned in my other thread that this might provide value to other users - and then I see this one, in which it already has :) Thanks again for what you've done and for helping out the community here.

    If you're ever interested in going PRO, shoot us an email (pro /a/ tri.be) and we'll see about getting you a discount on the license of your choosing...our way of saying thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • The Events Calendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic