{"id":1028209,"date":"2015-11-19T12:13:43","date_gmt":"2015-11-19T20:13:43","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/trying-to-limit-hours-displayed-in-week-view\/"},"modified":"2015-11-20T06:18:42","modified_gmt":"2015-11-20T14:18:42","slug":"trying-to-limit-hours-displayed-in-week-view","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/trying-to-limit-hours-displayed-in-week-view\/","title":{"rendered":"Trying to limit hours displayed in WEEK VIEW"},"content":{"rendered":"<p>Hello,<\/p>\n<p>I am writing this because I actually found the answer to this about 2 months ago when I initially setup my site, but for some reason the &#8220;fix&#8221; no longer works.<\/p>\n<p>I am needing to remove the full 24 hours from the week view. As it displays now, people see the day activities for the week at 12am and have to scroll down quite a bit to see the activities at 9am.<\/p>\n<p>I used this script before in my header file and it worked a couple months ago:<\/p>\n<p>add_filter( \u2018tribe_events_week_get_hours\u2019, \u2018filter_week_hours\u2019 );<br \/>\nfunction filter_week_hours( $hours ) {<br \/>\n$hour = 0;<\/p>\n<p>foreach ( $hours as $key =&gt; $formatted_hour ) {<br \/>\nif ( $hour &lt; 9 || $hour &gt; 19 ) {<br \/>\nunset( $hours[ $hour ] );<br \/>\n}<\/p>\n<p>$hour ++;<br \/>\n}<\/p>\n<p>return $hours;<br \/>\n}<\/p>\n<p>Now this code no longer works. All days in week view start at 12 am&#8230; is there any solution to this that will &#8220;stick&#8221;? I have hunted this forum for help with this, but I seem to be the only one with this issue&#8230; any help is appreciated, thank you<\/p>\n","protected":false},"template":"","class_list":["post-1028209","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>Trying to limit hours displayed in WEEK VIEW -<\/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\/trying-to-limit-hours-displayed-in-week-view\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Trying to limit hours displayed in WEEK VIEW -\" \/>\n<meta property=\"og:description\" content=\"Hello, I am writing this because I actually found the answer to this about 2 months ago when I initially setup my site, but for some reason the &#8220;fix&#8221; no longer works. I am needing to remove the full 24 hours from the week view. As it displays now, people see the day activities for [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/trying-to-limit-hours-displayed-in-week-view\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-11-20T14:18:42+00:00\" \/>\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\/trying-to-limit-hours-displayed-in-week-view\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/trying-to-limit-hours-displayed-in-week-view\/\",\"name\":\"Trying to limit hours displayed in WEEK VIEW -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-11-19T20:13:43+00:00\",\"dateModified\":\"2015-11-20T14:18:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/trying-to-limit-hours-displayed-in-week-view\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/trying-to-limit-hours-displayed-in-week-view\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/trying-to-limit-hours-displayed-in-week-view\/#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\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Trying to limit hours displayed in WEEK VIEW\"}]},{\"@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":"Trying to limit hours displayed in WEEK VIEW -","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\/trying-to-limit-hours-displayed-in-week-view\/","og_locale":"en_US","og_type":"article","og_title":"Trying to limit hours displayed in WEEK VIEW -","og_description":"Hello, I am writing this because I actually found the answer to this about 2 months ago when I initially setup my site, but for some reason the &#8220;fix&#8221; no longer works. I am needing to remove the full 24 hours from the week view. As it displays now, people see the day activities for [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/trying-to-limit-hours-displayed-in-week-view\/","article_modified_time":"2015-11-20T14:18:42+00:00","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\/trying-to-limit-hours-displayed-in-week-view\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/trying-to-limit-hours-displayed-in-week-view\/","name":"Trying to limit hours displayed in WEEK VIEW -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-11-19T20:13:43+00:00","dateModified":"2015-11-20T14:18:42+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/trying-to-limit-hours-displayed-in-week-view\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/trying-to-limit-hours-displayed-in-week-view\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/trying-to-limit-hours-displayed-in-week-view\/#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":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Trying to limit hours displayed in WEEK VIEW"}]},{"@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\/1028209","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":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1028209\/revisions"}],"predecessor-version":[{"id":1028262,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1028209\/revisions\/1028262"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1028209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}