Not able to format list widget date header

Home Forums Calendar Products Events Calendar PRO Not able to format list widget date header

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1513499
    planatstudio
    Participant

    Good day all,

    This topic is a follow up for this case: https://theeventscalendar.com/support/forums/topic/list-widget-date-display-not-according-to-plugin-settings/

    This topic is not resolved. Either I do not understand how to format the date header in the list widget or the formatting options don’t work correctly. See the attached screenshots where you can compare the settings and the actual results.

    To answer the last question in the previous thread: I have checked the template file from my theme, but they haven’t changed anything that could impact the day header. Also, changing the theme to twenty fifteen has no effect.

    Please let me know what else I can try to resolve this issue.

    With kind regards

    #1514818
    Sky
    Keymaster

    Hi there!

    I’m sorry to hear you’re having issues with the Events widget. I will try to help you get this sorted.

    I think I see where the confusion is coming in. The screenshots you’ve provided show the “this week events” widget, and not the “list” widget. This date display is not affected by the date format settings.

    The date format in this case is hard-coded into the widget template. You will need to create a custom template in order to change this.

    Copy the file from events-calendar-pro/src/views/pro/widgets/this-week/loop-grid-day.php to [your-theme]/tribe-events/pro/widgets/this-week/loop-grid-day.php. Then you can modify the output at lines 19 and 20.

    Here is an example on how to grab and format the date in the template:

    <span>
    <?php echo date( 'D jS', strtotime( $day['date'] ) ); ?>
    </span>

    So, you could just replace ‘D jS’ with whatever format you want in that example.

    For more information on customizing the events templates, please see our Themer’s Guide.

    Hope this helps! Let me know if you have any other questions.

    Thanks,
    Sky

    #1518881
    planatstudio
    Participant

    Hi, thank you very much for this solution! Worked like a charm 🙂

    #1519185
    Sky
    Keymaster

    Awesome!

    Glad this helped!

    Please let us know if you have any other questions or issues in the future.

    Take care,
    Sky

    #1536162
    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 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Not able to format list widget date header’ is closed to new replies.