Home › Forums › Calendar Products › Events Calendar PRO › Change "Day" to "Month" in Upcoming Events Widget
- This topic has 3 replies, 2 voices, and was last updated 10 years ago by
Brian.
-
AuthorPosts
-
May 8, 2016 at 11:03 am #1112025
Kary
ParticipantI found this thread and tried to use it to make the change I’d like, but it’s not working. Can’t figure out why. https://theeventscalendar.com/support/forums/topic/add-month-to-dateday-box-in-widget-list-view/
What I’m trying to do is replace the DAY with the MONTH in the Upcoming Events Widget and when using the Shortcode Events list view. You can see what I’d like to do in the image. The current / default version is on the left. What I’m trying to do is shown on the right. But it’s not working for me.
- I copied the the single-event.php file into my themes folder. The directory is /parallax-pro/tribe-events/views/pro/widgets/modules/single-event.php
-
On line 26 of that file, I replaced
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>-
…with this line of code.
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>-
All I changed was the PHP date format form “D” to “M” would should produce a 3-letter month. It doesn’t. In fact NOTHING changes.
- I have emptied my cache at the server level, checked to make sure the copied/edited file is on my server, refreshed my page. Nothing
Any ideas?
May 9, 2016 at 5:21 am #1112190Brian
MemberHi,
Thanks for using our plugins. I can help out here.
The directory for custom templates in your theme should be this:
/parallax-pro/tribe-events/pro/widgets/modules/single-event.php
Essentially src/views becomes tribe-events.
Also, in 4.2 the Event List Widget and Shortcode will show the Month instead of day name for events not in the current month. For example events in May will show the day of the week, but events in June would show Jun.
Let me know if changing that directory works for you.
Cheers
May 9, 2016 at 7:54 am #1112253Kary
Participantyes…that did it. Thanks I was able to make it look exactly like my client needed.
May 9, 2016 at 7:55 am #1112254Brian
MemberGreat, glad it helps, I am going to go ahead and close this ticket, but if you need help on this or something else please post a new ticket.
Thanks!
-
AuthorPosts
- The topic ‘Change "Day" to "Month" in Upcoming Events Widget’ is closed to new replies.
