Events 'list Widget' date image to show month instead of day of the week?

Home Forums Calendar Products Events Calendar PRO Events 'list Widget' date image to show month instead of day of the week?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #950453
    results
    Participant

    I need to change the formatting of the date icon shown on the list widget.
    Currently the date icon shows the day of the week with the day number :
    Example:

    Thur
    26

    I need to make change it to show the month instead of the day.
    Example:

    May
    26

    I can’t seem to find the bit of code that is affecting that part of the plugin.
    Could you help me with this please.

    Thanks

    #950474
    Geoff
    Member

    Hi thereĀ Mehrdad! Thanks for getting in touch and welcome back to the forums. šŸ™‚

    Good question. That icon is actually not an image, but styled completely with CSS.Ā That’s a good thing, but it makes updating it much easier.

    First, make a copy of theĀ single-event.php template. It’s located at /plugins/events-calendar-pro/views/pro/widgets/modules/single-event.php. Then,

    • Create a new folder in your theme directory calledĀ tribe-events
    • Create a new folder in that one calledĀ pro
    • Create a new folder in that one calledĀ widgets
    • Create one more new folder in that one calledĀ modules
    • Drop your copiedĀ single-event.php file in that last folder

    Now that the file is in your theme, you can modify it to suit your needs. In this case, change this line:

    <span
    class="list-dayname"><?php echo apply_filters( 'tribe-mini_helper_tribe_events_ajax_list_dayname', date_i18n( 'D', $postDate ), $postDate, $class ); ?></span>

    …to this:

    <span
    class="list-dayname"><?php echo apply_filters( 'tribe-mini_helper_tribe_events_ajax_list_dayname', date_i18n( 'M', $postDate ), $postDate, $class ); ?></span>

    That should change the icon so it shows the abbreviated month name (e.g. Jan) instead of the day of the week.

    Cheers!
    Geoff

    #950487
    results
    Participant

    That worked great! Thanks.
    There’s only one thing I need to mention.
    Events calendar pro is a neat plugin and you can do a lot of customization but most of it has to be done with template overrides. It would be great if most of these customizations could be done under the widget settings or general settings. Every time I create a new site that needs a calendar, it takes me a while to make all the customization I need.

    Please consider this for future updates. It is just this close to be the perfect WordPress Calendar plugin.

    Thanks so much for your quick responses.

    #950630
    Geoff
    Member

    Hi Mehrdad! Awesome, I’m so glad that worked out and accomplished what you were looking for. šŸ™‚

    Thanks for the feedback as well. As youĀ noted, the calendar is very customizable. If you have specific ideas for what sort of customizations you would like to see done without template overrides and how those might work, we’d love to hear about them on our UserVoice forum. That’s where we take new feature suggestions.

    I’ll go ahead and close this thread since you marked it as Resolved, but please feel free to reach back out if any other questions pop up and we’d be happy to help. šŸ™‚

    Cheers!
    Geoff

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Events 'list Widget' date image to show month instead of day of the week?’ is closed to new replies.