{"id":1317259,"date":"2017-07-06T21:43:48","date_gmt":"2017-07-07T04:43:48","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/"},"modified":"2017-07-06T21:43:48","modified_gmt":"2017-07-07T04:43:48","slug":"default-startend-times-for-community-events","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/","title":{"rendered":"Default start\/end times for community events"},"content":{"rendered":"<p>I am using the snippet provided by Nico to change the start\/end times for community events but it isn&#8217;t working- can you help?<\/p>\n<p>add_action( &#8216;tribe_community_events_form_start_time_selector&#8217;, &#8216;comm_default_start_time&#8217;, 10, 2 );<br \/>\nfunction comm_default_start_time( $output, $event_id ) {<\/p>\n<p>    if ( !$event_id ) {<\/p>\n<p>        $new_time = strtotime( &#8216;7:30pm&#8217; );<\/p>\n<p>        $start_date = tribe_event_format_date( $new_time, true, Tribe__Events__Date_Utils::DBDATETIMEFORMAT );<\/p>\n<p>        $start_minutes     = Tribe__Events__View_Helpers::getMinuteOptions( $start_date, true );<br \/>\n        $start_hours = Tribe__Events__View_Helpers::getHourOptions( $is_all_day == &#8216;yes&#8217; ? null : $start_date, true );<br \/>\n        $start_meridian = Tribe__Events__View_Helpers::getMeridianOptions( $start_date, true );<\/p>\n<p>        $output = &#8221;;<br \/>\n        $output .= sprintf( &#8216;&lt;select name=&#8221;EventStartHour&#8221;&gt;%s&lt;\/select&gt;&#8217;, $start_hours );<br \/>\n        $output .= sprintf( &#8216;&lt;select name=&#8221;EventStartMinute&#8221;&gt;%s&lt;\/select&gt;&#8217;, $start_minutes );<br \/>\n        if ( ! tribe_community_events_use_24hr_format() ) {<br \/>\n            $output .= sprintf( &#8216;&lt;select name=&#8221;EventStartMeridian&#8221;&gt;%s&lt;\/select&gt;&#8217;, $start_meridian );<br \/>\n        }<br \/>\n    }<\/p>\n<p>    return $output;<br \/>\n}<\/p>\n<p>add_action( &#8216;tribe_community_events_form_end_time_selector&#8217;, &#8216;comm_default_end_time&#8217;, 10, 2 );<br \/>\nfunction comm_default_end_time( $output, $event_id ) {<\/p>\n<p>    if ( !$event_id ) {<\/p>\n<p>        $new_time = strtotime( &#8216;8:30pm&#8217; );<\/p>\n<p>        $start_date = tribe_event_format_date( $new_time, true, Tribe__Events__Date_Utils::DBDATETIMEFORMAT );<\/p>\n<p>        $start_minutes     = Tribe__Events__View_Helpers::getMinuteOptions( $start_date, true );<br \/>\n        $start_hours = Tribe__Events__View_Helpers::getHourOptions( $is_all_day == &#8216;yes&#8217; ? null : $start_date, true );<br \/>\n        $start_meridian = Tribe__Events__View_Helpers::getMeridianOptions( $start_date, true );<\/p>\n<p>        $output = &#8221;;<br \/>\n        $output .= sprintf( &#8216;&lt;select name=&#8221;EventStartHour&#8221;&gt;%s&lt;\/select&gt;&#8217;, $start_hours );<br \/>\n        $output .= sprintf( &#8216;&lt;select name=&#8221;EventStartMinute&#8221;&gt;%s&lt;\/select&gt;&#8217;, $start_minutes );<br \/>\n        if ( ! tribe_community_events_use_24hr_format() ) {<br \/>\n            $output .= sprintf( &#8216;&lt;select name=&#8221;EventStartMeridian&#8221;&gt;%s&lt;\/select&gt;&#8217;, $start_meridian );<br \/>\n        }<br \/>\n    }<\/p>\n<p>    return $output;<br \/>\n}<\/p>\n","protected":false},"template":"","class_list":["post-1317259","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Default start\/end times for community events -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Default start\/end times for community events -\" \/>\n<meta property=\"og:description\" content=\"I am using the snippet provided by Nico to change the start\/end times for community events but it isn&#8217;t working- can you help? add_action( &#8216;tribe_community_events_form_start_time_selector&#8217;, &#8216;comm_default_start_time&#8217;, 10, 2 ); function comm_default_start_time( $output, $event_id ) { if ( !$event_id ) { $new_time = strtotime( &#8216;7:30pm&#8217; ); $start_date = tribe_event_format_date( $new_time, true, Tribe__Events__Date_Utils::DBDATETIMEFORMAT ); $start_minutes = Tribe__Events__View_Helpers::getMinuteOptions( [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/\",\"name\":\"Default start\/end times for community events -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-07-07T04:43:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ticket Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Community Tickets\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/community-tickets\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Default start\/end times for community events\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Default start\/end times for community events -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/","og_locale":"en_US","og_type":"article","og_title":"Default start\/end times for community events -","og_description":"I am using the snippet provided by Nico to change the start\/end times for community events but it isn&#8217;t working- can you help? add_action( &#8216;tribe_community_events_form_start_time_selector&#8217;, &#8216;comm_default_start_time&#8217;, 10, 2 ); function comm_default_start_time( $output, $event_id ) { if ( !$event_id ) { $new_time = strtotime( &#8216;7:30pm&#8217; ); $start_date = tribe_event_format_date( $new_time, true, Tribe__Events__Date_Utils::DBDATETIMEFORMAT ); $start_minutes = Tribe__Events__View_Helpers::getMinuteOptions( [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/","name":"Default start\/end times for community events -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-07-07T04:43:48+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/default-startend-times-for-community-events\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Ticket Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/"},{"@type":"ListItem","position":4,"name":"Community Tickets","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/community-tickets\/"},{"@type":"ListItem","position":5,"name":"Default start\/end times for community events"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1317259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1317259\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1317259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}