list-widget – display Month/Date rather than Day/Date for recurring events

Home Forums Calendar Products Events Calendar PRO list-widget – display Month/Date rather than Day/Date for recurring events

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1601034
    acfwebmaster
    Participant

    I haven’t been able to find anything about this in the settings, nor the knowledgebase or codex. My list-widget currently appears as in the attached screenshot – the top event is a recurring event currently in progress, while the other events have not yet begun. I would like to change it so that all events display the month rather than the day of the week (regardless of whether recurring, in-progress, or otherwise), as I feel mixing the formats in the listing is likely to cause confusion.

    How would this be best achieved?

    #1601039
    acfwebmaster
    Participant

    The forum software here is throwing an error when trying to edit the above post – Just wanted to note that my preference would be to show the start date of the event rather than that of the next instance, but either would be acceptable so long as it is in the correct format.

    #1603186
    Jennifer
    Keymaster

    Hello,

    Thanks for reaching out!

    By default, the day of the week will be displayed for events in the current month, and the month will be displayed for events outside of the current month. You can change this however by doing a template override of the single-event.php file found at wp-content/plugins/events-calendar-pro/src/views/pro/widgets/modules. The following block of code contains this logic:

    if (
    isset( $instance['tribe_is_list_widget'] )
    && date( 'm', $post_date ) != date( 'm', current_time( 'timestamp' ) )
    ) :
    ?>







    In your copy, you can either remove the condition and leave only the code to display the month, or you can simply change this line

    date_i18n( 'D', $post_date ),

    to

    date_i18n( 'M', $post_date ),

    so that the month will always be displayed.

    We are limited in the amount of support that we can provide for customizations, but if you get stuck or have any questions, please let me know – I’ll be happy to try to point you in the right direction!

    Thanks,

    Jennifer

    #1603999
    acfwebmaster
    Participant

    Thanks, that worked.

    #1604335
    Jennifer
    Keymaster

    No problem! Let me know if there is anything else that I can help with : )

    #1622082
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘list-widget – display Month/Date rather than Day/Date for recurring events’ is closed to new replies.