Home › Forums › Calendar Products › Events Calendar PRO › change the Events Pro widget display date
- This topic has 5 replies, 3 voices, and was last updated 10 years, 8 months ago by
Support Droid.
-
AuthorPosts
-
July 19, 2015 at 6:55 pm #987705
flyingarts
ParticipantHi Folks – I’m using the Calendar Pro events widget in the sidebar and in other widget areas.
Currently the widget thumbnail date on the left shows the day of the week and then the date underneath.
See the bottom widget in my sidebar here
http://flyingarts.pboworkspace.info/news/Is there anyway to set it as is shows the Month and the day and date underneath?
See my mockup hereThis would make far more sense in the list view
cheers
July 20, 2015 at 8:48 am #987865Geoff
MemberHi Stephen!
Sure, that is quite possible. Here’s how to change the widget from showing the day of the week to showing the abbreviated month instead:
- Make a copy of the widget template. It is located in /plugins/the-events-calendar/widgets/modules/single-event.php
- Make a new folder in your theme directory called tribe-events
- Make a new folder in that one called widgets
- Make a new folder in that one called modules
- Drop the copied template in that last folder
Now that the template is in your theme, it can be customized to suit your needs. In this case, change this line:
[php]
<span
class="list-dayname"><?php echo apply_filters( ‘tribe-mini_helper_tribe_events_ajax_list_dayname’, date_i18n( ‘D’, $postDate ), $postDate, $mini_cal_event_atts[‘class’] ); ?></span>
[/php]…to this:
[php]
<span
class="list-dayname"><?php echo apply_filters( ‘tribe-mini_helper_tribe_events_ajax_list_dayname’, date_i18n( ‘M’, $postDate ), $postDate, $mini_cal_event_atts[‘class’] ); ?></span>
[/php]Does this work for you? Please let me know. 🙂
Cheers!
GeoffJuly 20, 2015 at 5:48 pm #988201flyingarts
Participantawesome thanks Geoff – will check it out and see
July 20, 2015 at 5:52 pm #988204flyingarts
ParticipantAlso Geoff, another quick question – using your logic above , is it possible to show the featured image thumbnail instead of the date?
July 21, 2015 at 7:24 am #988381Geoff
MemberAbsolutely! You can modify the template to suit any of your needs now that it is in your theme directory. Plus, this way, your customizations will stay in tact, even after an update to the plugin. 🙂
Keep me posted and let me know if the date format worked out for you.
Geoff
August 5, 2015 at 7:05 am #993371Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘change the Events Pro widget display date’ is closed to new replies.
