Home › Forums › Calendar Products › Events Calendar PRO › changing the _EventStartDate format
- This topic has 5 replies, 2 voices, and was last updated 5 years, 6 months ago by Cliff.
-
AuthorPosts
-
September 23, 2018 at 7:27 am #1628553virginiatodParticipant
Hi,
I’m using the events calendar plugin with The7 theme and editing my page with WP Bakery Page Builder.
The “Page Masonry Grid View” requires a meta key to show the events in date order, and I used _EventStartDate, but the thing is I really NEED to change the format from YYYY-MM-DD hh:mm:ss to DD-MM-YYYY hh:mm, is there any way to do this??September 24, 2018 at 3:34 pm #1629603CliffMemberHi. Thanks for your detailed request. Please check out https://theeventscalendar.com/knowledgebase/integrating-events-calendar-slider-revolution-essential-grid/ for some workaround ideas.
Please let me know how this goes for you.
October 2, 2018 at 6:37 am #1635320virginiatodParticipantI can’t make this work. I need the date to be shown in some other way
October 2, 2018 at 1:33 pm #1635790CliffMemberSorry to hear that. Please send along what you’ve tried, and I can advise further. Please also share an annotated screenshot, screen capture video, and/or relevant URLs to clarify the context of what you’ve tried that isn’t working.
October 3, 2018 at 5:18 am #1636149virginiatodParticipantI tried creating a shortcode in the functions.php file:
add_shortcode('string2date', 'string2date_func'); function string2date_func($atts, $content){ $atts = shortcode_atts( array( 'slug' => '_EventStartDate', 'format' => 'M. j', ), $atts); $res = ''; if($atts['slug']){ $str = get_post_meta(get_the_ID(), $atts['slug'], true); $time_stamp = strtotime($str); $res = date($atts['format'], $time_stamp); } return $res; }
and calling it this way:
[string2date slug="_EventStartDate" format="M. j"]
But it returns me a wrong date.
Any suggestions?
October 3, 2018 at 10:32 am #1636557CliffMemberGotcha. Please try one of these pre-built solutions instead, as detailed in the Slider Revolution article I previously shared:
- https://theeventscalendar.com/knowledgebase/embedding-single-events-tribe_event_inline-shortcode/
- https://theeventscalendar.com/extensions/formatted-event-date-shortcode/
Please let me know how this goes for you.
October 25, 2018 at 9:35 am #1648752Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘changing the _EventStartDate format’ is closed to new replies.