{"id":1945966,"date":"2020-02-19T18:45:43","date_gmt":"2020-02-19T23:45:43","guid":{"rendered":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/?post_type=tribe-knowledgebase&#038;p=1945966"},"modified":"2025-06-08T09:11:15","modified_gmt":"2025-06-08T13:11:15","slug":"remove-the-event-end-time-in-views","status":"publish","type":"post","link":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/remove-the-event-end-time-in-views\/","title":{"rendered":"Remove the Event End Time in Views"},"content":{"rendered":"\n<p>By default, The Events Calendar displays the start and end times for events.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2020\/02\/single-start-end-time.png\" alt=\"The Events Calendar displays the start and end time of events\" class=\"wp-image-1946078\"\/><\/figure>\n\n\n\n<p>Let&#8217;s say you only want to display the start&nbsp;time. Add the snippet at the end of this post into your theme&#8217;s <code>functions.php<\/code> file and the end time will no longer display for events that end on the same day when viewing the list, day, map and photo views as well as the event itself.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2020\/02\/single-start-time.png\" alt=\"You can remove the end time of the event if you prefer.\" class=\"wp-image-1946079\"\/><\/figure>\n\n\n\n<p>The end time will also be hidden in event details and tooltips included in the calendar&#8217;s week and month views.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/knowledgebase\/wp-content\/uploads\/2019\/10\/month-tooltip-remove-end-time.png\" alt=\"The end time will also be hidden in the month view tooltip\" class=\"wp-image-1946081\"\/><\/figure>\n\n\n\n<p>Here&#8217;s the&nbsp;snippet:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( &#039;tribe_events_event_schedule_details_formatting&#039;, &#039;tribe_remove_end_date&#039; );\nfunction tribe_remove_end_date ( $settings ) {\n  $settings&#x5B;&#039;show_end_time&#039;] = false;\n  return $settings;\n}\n<\/pre><\/div>\n\n\n<p>If you&#8217;d rather not show any times, you can do something similar:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( &#039;tribe_events_event_schedule_details_formatting&#039;, &#039;tribe_remove_end_date&#039; );\nfunction tribe_remove_end_date ( $settings ) {\n  $settings&#x5B;&#039;time&#039;] = false;\n  return $settings;\n}\n<\/pre><\/div>\n\n\n<p>If you want to remove the end times from the calendar month, map, and photo views (the last two of which are available with <a href=\"https:\/\/theeventscalendar.com\/product\/wordpress-events-calendar-pro\/\" target=\"_blank\" rel=\"noreferrer noopener\">Events Calendar Pro<\/a>), you need to do a bit of <a href=\"https:\/\/dev.theeventscalendar.com\/knowledgebase\/k\/customizing-template-files-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">template customization<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>View<\/th><th>Template<\/th><\/tr><\/thead><tbody><tr><td>Month view<\/td><td><code>the-events-calendar\/src\/views\/v2\/month\/calendar-body\/day\/calendar-events\/calendar-event\/date.php<\/code><\/td><\/tr><tr><td>Map view<\/td><td><code>events-pro\/src\/views\/v2\/map\/event-cards\/event-card\/event\/date-time.php<\/code><\/td><\/tr><tr><td>Photo view<\/td><td><code>events-pro\/src\/views\/v2\/photo\/event\/date-time.php<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>They all require the same line changed:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n\/\/ Old line:\n$display_end_date = $event-&gt;dates-&gt;start_display-&gt;format( &#039;H:i&#039; ) !== $event-&gt;dates-&gt;end_display-&gt;format( &#039;H:i&#039; );\n\n\/\/ Change to:\n$display_end_date = false;\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-the-events-calendar-settings\">The Events Calendar Settings<\/h3>\n\n\n\n<p>Alternatively, this can be accomplished in The Events Calendar settings screen: Events -> Settings -> Display -> Date &amp; Time -> <strong>Remove event end time<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"542\" height=\"305\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2020\/02\/image-2.png\" alt=\"\" class=\"wp-image-1965596\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2020\/02\/image-2.png 542w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2020\/02\/image-2-300x169.png 300w\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>By default, The Events Calendar displays the start and end times for events. Let&#8217;s say you only want to display the start&nbsp;time. Add the snippet at the end of this post into your theme&#8217;s functions.php file and the end time will no longer display for events that end on the same day when viewing the&#8230;<\/p>\n","protected":false},"author":3,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[79],"tags":[25,58],"stellar-product-taxonomy":[161],"class_list":["post-1945966","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippets","tag-customizations","tag-php","stellar-product-taxonomy-the-events-calendar"],"acf":[],"taxonomy_info":{"category":[{"value":79,"label":"Snippets"}],"post_tag":[{"value":25,"label":"Customizations"},{"value":58,"label":"PHP"}],"stellar-product-taxonomy":[{"value":161,"label":"The Events Calendar"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Jaime Marchwinski","author_link":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/author\/jaimetri-be\/"},"comment_info":0,"category_info":[{"term_id":79,"name":"Snippets","slug":"snippets","term_group":0,"term_taxonomy_id":79,"taxonomy":"category","description":"","parent":0,"count":136,"filter":"raw","term_order":"0","cat_ID":79,"category_count":136,"category_description":"","cat_name":"Snippets","category_nicename":"snippets","category_parent":0}],"tag_info":[{"term_id":25,"name":"Customizations","slug":"customizations","term_group":0,"term_taxonomy_id":25,"taxonomy":"post_tag","description":"","parent":0,"count":177,"filter":"raw","term_order":"0"},{"term_id":58,"name":"PHP","slug":"php","term_group":0,"term_taxonomy_id":58,"taxonomy":"post_tag","description":"","parent":20,"count":128,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1945966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1945966"}],"version-history":[{"count":2,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1945966\/revisions"}],"predecessor-version":[{"id":1965597,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1945966\/revisions\/1965597"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1945966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1945966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1945966"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1945966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}