{"id":268644,"date":"2014-07-02T18:05:42","date_gmt":"2014-07-03T01:05:42","guid":{"rendered":"https:\/\/tri.be\/support\/forums\/topic\/events-added-to-main-loop-loop-modified-orderby-broken\/"},"modified":"2014-07-04T22:18:14","modified_gmt":"2014-07-05T05:18:14","slug":"events-added-to-main-loop-loop-modified-orderby-broken","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-added-to-main-loop-loop-modified-orderby-broken\/","title":{"rendered":"Events Added to Main Loop; Loop Modified; Orderby Broken"},"content":{"rendered":"<p>My site requires a hero banner on the home page that&#8217;s either populated by 1) a featured flag designated with a meta key or 2) the next upcoming event when the flag isn&#8217;t present. In both cases, I want the post to be removed from the main loop if it&#8217;s populating the hero banner.<\/p>\n<p>I&#8217;ve achieved adding events to my the main loop with pre_get_posts in functions.php.<br \/>\nI&#8217;ve populated the banner for both cases with get_posts and some conditional statements.<br \/>\nI&#8217;ve removed the flagged post from the loop through post__not_in argument with query_posts.<br \/>\nThe modified loop returns all of the posts I expect\u2026<\/p>\n<p>HOWEVER<br \/>\nWordPress is treating the EVENT START DATE on every tribe_events post type AS THE PUBLISHED DATE. This is very, very confusing. If I wanted this behavior, I would use tribe_get_events.<\/p>\n<p>Am I missing something or is the bug in forum thread below still not fixed?<br \/>\nhttps:\/\/tri.be\/support\/forums\/topic\/wp_query-with-orderby-date-returns-an-ordering-based-on-the-events-start-date\/<\/p>\n<p>I&#8217;ve been picking away at this hero functionality on and off for months now and I&#8217;m very close to solving it. Thanks in advance for any insight into this problem.<\/p>\n","protected":false},"template":"","class_list":["post-268644","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>Events Added to Main Loop; Loop Modified; Orderby Broken -<\/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\/events-added-to-main-loop-loop-modified-orderby-broken\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Events Added to Main Loop; Loop Modified; Orderby Broken -\" \/>\n<meta property=\"og:description\" content=\"My site requires a hero banner on the home page that&#8217;s either populated by 1) a featured flag designated with a meta key or 2) the next upcoming event when the flag isn&#8217;t present. In both cases, I want the post to be removed from the main loop if it&#8217;s populating the hero banner. I&#8217;ve [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-added-to-main-loop-loop-modified-orderby-broken\/\" \/>\n<meta property=\"article:modified_time\" content=\"2014-07-05T05:18:14+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\/events-added-to-main-loop-loop-modified-orderby-broken\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-added-to-main-loop-loop-modified-orderby-broken\/\",\"name\":\"Events Added to Main Loop; Loop Modified; Orderby Broken -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2014-07-03T01:05:42+00:00\",\"dateModified\":\"2014-07-05T05:18:14+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-added-to-main-loop-loop-modified-orderby-broken\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-added-to-main-loop-loop-modified-orderby-broken\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-added-to-main-loop-loop-modified-orderby-broken\/#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\":\"Events Added to Main Loop; Loop Modified; Orderby Broken\"}]},{\"@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":"Events Added to Main Loop; Loop Modified; Orderby Broken -","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\/events-added-to-main-loop-loop-modified-orderby-broken\/","og_locale":"en_US","og_type":"article","og_title":"Events Added to Main Loop; Loop Modified; Orderby Broken -","og_description":"My site requires a hero banner on the home page that&#8217;s either populated by 1) a featured flag designated with a meta key or 2) the next upcoming event when the flag isn&#8217;t present. In both cases, I want the post to be removed from the main loop if it&#8217;s populating the hero banner. I&#8217;ve [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-added-to-main-loop-loop-modified-orderby-broken\/","article_modified_time":"2014-07-05T05:18:14+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\/events-added-to-main-loop-loop-modified-orderby-broken\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-added-to-main-loop-loop-modified-orderby-broken\/","name":"Events Added to Main Loop; Loop Modified; Orderby Broken -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2014-07-03T01:05:42+00:00","dateModified":"2014-07-05T05:18:14+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-added-to-main-loop-loop-modified-orderby-broken\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-added-to-main-loop-loop-modified-orderby-broken\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-added-to-main-loop-loop-modified-orderby-broken\/#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":"Events Added to Main Loop; Loop Modified; Orderby Broken"}]},{"@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\/268644","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\/268644\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=268644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}