The Events Calendar
[resolved] Formatting dates in upcoming events list view (3 posts)

  1. bolide
    Posted 4 years ago #

    I want to format dates differently in the upcoming events list view. The date seems to be generated in the list.php file using:

    '<h4 class="event-day"><?php echo tribe_event_format_date(strtotime(get_query_var('eventDate')), false); ?></h4>'

    OK, how (and where) do I best format the date using Date()?

    Is tribe_event_format_date editable and where is it?

    The css is in events.css under class="event-day"

    Nick Froome


  2. bolide
    Posted 4 years ago #

    To answer my own question, edit a copy of list.php as below and place it in /events in your theme folder or theme child folder if you are using a child theme

    '<h4 class="event-day"><?php echo tribe_get_start_date( null, false, 'your-PHP-date-formatting-tags-here'); ?></h4>'

    (lines 32 and 35 in my list.php)

    Replace 'your-PHP-date-formatting-tags-here' with 'l, jS F Y', etc. Find the formatting tags via Googling for PHP Date()

    Nick Froome

  3. Rob La Gatta
    Modern Tribe Support
    Plugin Author

    Posted 4 years ago #

    Hey dude! Glad to hear you got this figured out...sorry you had to do so on your own before we could jump in to assist. If you need anything else down the road please let us know.

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