{"id":1429219,"date":"2018-01-18T01:58:42","date_gmt":"2018-01-18T09:58:42","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/draft-events-in-frontend\/"},"modified":"2018-01-18T01:58:42","modified_gmt":"2018-01-18T09:58:42","slug":"draft-events-in-frontend","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/draft-events-in-frontend\/","title":{"rendered":"Draft Events in Frontend"},"content":{"rendered":"<p>Hi there<\/p>\n<p>I&#8217;m willing to show the events in the draft status also in the month grid in the frontend: the purpose is to allow people to choose dates for their events in our territory being informed about already confirmed events (&#8220;published&#8221;) but also under construction events (&#8220;drafts&#8221;). I&#8217;ll definitely use your Community and Pro version for this purpose&#8230;<\/p>\n<p>Fact is, I want everything to happen in the frontend. I thought of editing \/src\/Tribe\/Templates\/Month.php lines 381-399 as follows, but I see private events as before, but no draft events&#8230; Am I missing something?<\/p>\n<p>protected function set_args( $args = array() ) {<\/p>\n<pre><code>        $doing_ajax = ( defined( 'DOING_AJAX' ) &amp;amp;&amp;amp; DOING_AJAX ) ? true : false;\n\n        if ( empty( $args ) &amp;amp;&amp;amp; $doing_ajax ) {\n            $post_status = array( 'publish' );\n            if ( is_user_logged_in() ) {\n                \/\/EDITED WITH \"DRAFT\" $post_status[] = 'private';\n                $post_status[] = 'private, draft';\n            }\n            \/\/ set the global query var for eventDisplay\n            $args = array(\n                'post_type'    =&amp;gt; Tribe__Events__Main::POSTTYPE,\n                'eventDisplay' =&amp;gt; 'month',\n                'eventDate'    =&amp;gt; $_POST['eventDate'],\n                'post_status'  =&amp;gt; $post_status,\n                'featured'     =&amp;gt; tribe( 'tec.featured_events' )-&amp;gt;featured_events_requested(),\n            );\n        }\n<\/code><\/pre>\n<p>I thought of using &#8220;Private&#8221; status instead of draft, but I&#8217;d like to see the events automatically when published by Organizers through Community.<\/p>\n<p>Any ideas? Thanks a lot!<\/p>\n","protected":false},"template":"","class_list":["post-1429219","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>Draft Events in Frontend -<\/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\/draft-events-in-frontend\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Draft Events in Frontend -\" \/>\n<meta property=\"og:description\" content=\"Hi there I&#8217;m willing to show the events in the draft status also in the month grid in the frontend: the purpose is to allow people to choose dates for their events in our territory being informed about already confirmed events (&#8220;published&#8221;) but also under construction events (&#8220;drafts&#8221;). I&#8217;ll definitely use your Community and Pro [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/draft-events-in-frontend\/\" \/>\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\/draft-events-in-frontend\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/draft-events-in-frontend\/\",\"name\":\"Draft Events in Frontend -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2018-01-18T09:58:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/draft-events-in-frontend\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/draft-events-in-frontend\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/draft-events-in-frontend\/#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\":\"Draft Events in Frontend\"}]},{\"@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":"Draft Events in Frontend -","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\/draft-events-in-frontend\/","og_locale":"en_US","og_type":"article","og_title":"Draft Events in Frontend -","og_description":"Hi there I&#8217;m willing to show the events in the draft status also in the month grid in the frontend: the purpose is to allow people to choose dates for their events in our territory being informed about already confirmed events (&#8220;published&#8221;) but also under construction events (&#8220;drafts&#8221;). I&#8217;ll definitely use your Community and Pro [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/draft-events-in-frontend\/","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\/draft-events-in-frontend\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/draft-events-in-frontend\/","name":"Draft Events in Frontend -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2018-01-18T09:58:42+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/draft-events-in-frontend\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/draft-events-in-frontend\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/draft-events-in-frontend\/#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":"Draft Events in Frontend"}]},{"@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\/1429219","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\/1429219\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1429219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}