{"id":1115051,"date":"2016-05-16T11:31:38","date_gmt":"2016-05-16T18:31:38","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-import-rss-programmatically-with-tribe_create_event\/"},"modified":"2016-05-26T16:03:57","modified_gmt":"2016-05-26T23:03:57","slug":"add-event-import-rss-programmatically-with-tribe_create_event","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-import-rss-programmatically-with-tribe_create_event\/","title":{"rendered":"Add Event \/ Import RSS programmatically with tribe_create_event"},"content":{"rendered":"<p>I&#8217;m importing an RSS feed into The Events Calendar, so we can use it to display events.<\/p>\n<p>Initially, if we used WP&#8217;s <strong>wp_insert_post<\/strong> command, we could import items as &#8220;posts&#8221;, with only partial success adding them as &#8220;events&#8221;: the imported event would get added to the database, and be marked as &#8220;published&#8221; &#8211; but was not viewable in a browser (the page would be entirely blank). Clicking &#8220;Update&#8221; would then solve both these issues. <\/p>\n<p>Changing tactics, hooking into <strong>tribe_create_event<\/strong> is almost working: the event is added to the calendar, it is marked as published AND shows up on the site. The problem is that the event is not listed in any of the events listings. If one goes to the event and manually clicks &#8220;Update&#8221;, the event is then shown in the event listing.<\/p>\n<p>The question is: what other setting needs to get triggered for the post to show up as expected once <strong>tribe_create_event<\/strong> is run? Debug is on, and there appear to be no conflicts. Just looking for a little clarification.<\/p>\n<p>Thanks!<\/p>\n","protected":false},"template":"","class_list":["post-1115051","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>Add Event \/ Import RSS programmatically with tribe_create_event -<\/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\/add-event-import-rss-programmatically-with-tribe_create_event\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Add Event \/ Import RSS programmatically with tribe_create_event -\" \/>\n<meta property=\"og:description\" content=\"I&#8217;m importing an RSS feed into The Events Calendar, so we can use it to display events. Initially, if we used WP&#8217;s wp_insert_post command, we could import items as &#8220;posts&#8221;, with only partial success adding them as &#8220;events&#8221;: the imported event would get added to the database, and be marked as &#8220;published&#8221; &#8211; but was [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-import-rss-programmatically-with-tribe_create_event\/\" \/>\n<meta property=\"article:modified_time\" content=\"2016-05-26T23:03:57+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\/add-event-import-rss-programmatically-with-tribe_create_event\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-import-rss-programmatically-with-tribe_create_event\/\",\"name\":\"Add Event \/ Import RSS programmatically with tribe_create_event -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-05-16T18:31:38+00:00\",\"dateModified\":\"2016-05-26T23:03:57+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-import-rss-programmatically-with-tribe_create_event\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-import-rss-programmatically-with-tribe_create_event\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-import-rss-programmatically-with-tribe_create_event\/#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\":\"Add Event \/ Import RSS programmatically with tribe_create_event\"}]},{\"@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":"Add Event \/ Import RSS programmatically with tribe_create_event -","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\/add-event-import-rss-programmatically-with-tribe_create_event\/","og_locale":"en_US","og_type":"article","og_title":"Add Event \/ Import RSS programmatically with tribe_create_event -","og_description":"I&#8217;m importing an RSS feed into The Events Calendar, so we can use it to display events. Initially, if we used WP&#8217;s wp_insert_post command, we could import items as &#8220;posts&#8221;, with only partial success adding them as &#8220;events&#8221;: the imported event would get added to the database, and be marked as &#8220;published&#8221; &#8211; but was [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-import-rss-programmatically-with-tribe_create_event\/","article_modified_time":"2016-05-26T23:03:57+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\/add-event-import-rss-programmatically-with-tribe_create_event\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-import-rss-programmatically-with-tribe_create_event\/","name":"Add Event \/ Import RSS programmatically with tribe_create_event -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-05-16T18:31:38+00:00","dateModified":"2016-05-26T23:03:57+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-import-rss-programmatically-with-tribe_create_event\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-import-rss-programmatically-with-tribe_create_event\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-import-rss-programmatically-with-tribe_create_event\/#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":"Add Event \/ Import RSS programmatically with tribe_create_event"}]},{"@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\/1115051","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\/1115051\/revisions"}],"predecessor-version":[{"id":1115323,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1115051\/revisions\/1115323"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1115051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}