Home › Forums › Calendar Products › Events Calendar PRO › Widget Date Format
- This topic has 7 replies, 4 voices, and was last updated 13 years, 4 months ago by
Leah.
-
AuthorPosts
-
December 9, 2012 at 7:07 pm #29177
Grec
MemberI followed the advice in the following forum thread and it worked in terms of allowing me to remove the time from the event listing.
In my widget though it only lists shortened months out now. So instead of showing “January” it just shows “Jan”. I experimented with several other PHP date formats but couldn’t get things to work as I’m not really a programmer.
December 10, 2012 at 9:14 pm #29209Jonah
ParticipantHi Salvador,
Which widget are you wanting to change this on and do you have a link I can take a look at an example at?
Thanks,
JonahDecember 15, 2012 at 7:43 am #29567Grec
MemberSorry internal website… In the Events List Advanced Widget the date simply reads as “Dec 15, 2012” instead of with the month spelled out (e.g., December 15, 2012). As noted above I followed the directions at https://theeventscalendar.com/support/forums/topic/widget-separate-date-and-time/, where you suggested swapping:
echo tribe_get_start_date( $post->ID, $start );
with
echo tribe_get_start_date( $post->ID, false, ‘M’ );
echo tribe_get_start_date( $post->ID, false, ‘d’ );
echo tribe_get_start_date( $post->ID, false, ‘Y’ );
echo tribe_get_start_date( $post->ID, false, ‘g:ia’ );Since I didn’t want the “time” I just left out the last line. Of course the “M” format you suggested in the first line above displays the shortened month instead of the spelled out version (e.g., Dec instead of December). I am looking to have the spelled out version.
Thanks for you assistance…
December 15, 2012 at 11:03 am #29577Grec
MemberAlso any thoughts on creating an override file for this so I don’t have to redo the changes after each upgrade?
December 15, 2012 at 11:15 am #29578Grec
MemberFigure my previous question out in this great. Just make a copy of /wp-content/plugins/events-calendar-pro/views/events-advanced-list-load-widget-display.php and place it into an ‘events’ folder in your active theme.
Still need to get the month format issue correct though.
December 17, 2012 at 3:48 pm #29653Barry
MemberHi Salvador: is the remaining problem simply getting the full month name? If so, simply replace ‘M’ with ‘F’ – it’s the same format as used by PHP to describe date formats.
December 22, 2012 at 10:38 am #29941Grec
MemberThanks Barry! Worked like a charm.
December 22, 2012 at 5:38 pm #29947Leah
MemberGlad to hear it Salvador! If you don’t have any further questions here, I’ll close out the thread. Feel free to start another one if you need to 🙂
-
AuthorPosts
- The topic ‘Widget Date Format’ is closed to new replies.
