Date Format for Single Events

Home Forums Calendar Products Events Calendar PRO Date Format for Single Events

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #841600
    Jared
    Participant

    Hi,
    I would like to include the year with single event posts. In the settings I see an option to change the dating format (ie F j, Y) however for multi-day events the year comes after the first day, instead of the entire event (ie November 15, 2014 – 22). I would the year to be at the end (ie November 15 – 22, 2014). Can someone direct me to the specific file to make this change?

    #843799
    Josh
    Participant

    Hello jaredtyson,

    Thanks for reaching out to us!

    The date for the single event is set using the “tribe_events_event_schedule_details” function found within the template-tags -> general.php file of the core plugin. Within that function you can see a filter at the bottom with the same name. Using this filter, you can add a custom function within your theme’s “functions.php” file to modify the way the date is output.

    For this example, you can leave most of the function the same but just modify the “tribe_event_is_multiday” section to include the year after the second date of the event while leaving the setting within your dashboard set to “F j”.

    Let me know if this helps.

    Thanks!

    #860392
    Jared
    Participant

    Hi,
    Thank you for these directions. I actually found another way to do it, that was easier for me since I’m not much of a programmer. Here is what I did:
    In general.php on line 907 changed code:
    $format2ndday = ‘j’;
    to:
    $format2ndday = ‘j, Y’;

    #860870
    Josh
    Participant

    Hello jaredtyson,

    Thanks for following up with us!

    This will work as a solution, however these changes will get overwritten when updating the plugin. With this solution, you’ll need to remake the change after every update.

    I’ll go ahead and close this ticket. If you have any further questions please don’t hesitate to open a new one.

    Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Date Format for Single Events’ is closed to new replies.