Home › Forums › Calendar Products › Events Calendar PRO › Events 'list Widget' date image to show month instead of day of the week?
- This topic has 3 replies, 2 voices, and was last updated 9 years, 1 month ago by Geoff.
-
AuthorPosts
-
March 24, 2015 at 6:48 am #950453resultsParticipant
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
26I need to make change it to show the month instead of the day.
Example:May
26I 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
March 24, 2015 at 7:29 am #950474GeoffMemberHi 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!
GeoffMarch 24, 2015 at 7:47 am #950487resultsParticipantThat 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.
March 24, 2015 at 4:21 pm #950630GeoffMemberHi 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 -
AuthorPosts
- The topic ‘Events 'list Widget' date image to show month instead of day of the week?’ is closed to new replies.