{"id":1001572,"date":"2015-09-03T06:13:35","date_gmt":"2015-09-03T13:13:35","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/combine-events-by-publish-date-in-mutli-cpt-query\/"},"modified":"2015-09-08T07:42:11","modified_gmt":"2015-09-08T14:42:11","slug":"combine-events-by-publish-date-in-mutli-cpt-query","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/combine-events-by-publish-date-in-mutli-cpt-query\/","title":{"rendered":"Combine Events, by publish date, in mutli CPT query"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I have looked at a few thread that deal with ordering events by published date and your KB post on ordering by publish date in the main blog.<\/p>\n<p>We have an query that currently combines 4 CPTs, including events, but the future dated events hog the top spots when displayed. We need to query the events by published date, which we can then use to manually manipulate the position of the Event within the resulting query.<\/p>\n<p>Here is a link to the current production site<\/p>\n<p>https:\/\/womenandthechurch.org<\/p>\n<p>Here is a link to the gist<\/p>\n<p>https:\/\/gist.github.com\/OandB\/bc2920b6f4e575b616b9<\/p>\n<p>And if that does not work then\u2026<\/p>\n<pre><code>&lt;?php $the_query = new WP_Query( array(\n\t\t\t\t\t&#039;offset&#039; =&gt; 1,\n\t\t\t\t\t&#039;posts_per_page&#039; =&gt; 6,\t\n\t\t\t\t\t&#039;post_type&#039; =&gt; array( &#039;tribe_events&#039;, &#039;news&#039;, &#039;feature&#039;, &#039;resources&#039; )\n\t\t\t\t\t) ); ?&gt;\n&lt;?php while ($the_query -&gt; have_posts()) : $the_query -&gt; the_post(); ?&gt;<\/code><\/pre>\n<p>Thanks<br \/>\nG<\/p>\n","protected":false},"template":"","class_list":["post-1001572","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>Combine Events, by publish date, in mutli CPT query -<\/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\/combine-events-by-publish-date-in-mutli-cpt-query\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Combine Events, by publish date, in mutli CPT query -\" \/>\n<meta property=\"og:description\" content=\"Hi, I have looked at a few thread that deal with ordering events by published date and your KB post on ordering by publish date in the main blog. We have an query that currently combines 4 CPTs, including events, but the future dated events hog the top spots when displayed. We need to query [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/combine-events-by-publish-date-in-mutli-cpt-query\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-09-08T14:42:11+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\/combine-events-by-publish-date-in-mutli-cpt-query\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/combine-events-by-publish-date-in-mutli-cpt-query\/\",\"name\":\"Combine Events, by publish date, in mutli CPT query -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-09-03T13:13:35+00:00\",\"dateModified\":\"2015-09-08T14:42:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/combine-events-by-publish-date-in-mutli-cpt-query\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/combine-events-by-publish-date-in-mutli-cpt-query\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/combine-events-by-publish-date-in-mutli-cpt-query\/#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\":\"Combine Events, by publish date, in mutli CPT query\"}]},{\"@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":"Combine Events, by publish date, in mutli CPT query -","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\/combine-events-by-publish-date-in-mutli-cpt-query\/","og_locale":"en_US","og_type":"article","og_title":"Combine Events, by publish date, in mutli CPT query -","og_description":"Hi, I have looked at a few thread that deal with ordering events by published date and your KB post on ordering by publish date in the main blog. We have an query that currently combines 4 CPTs, including events, but the future dated events hog the top spots when displayed. We need to query [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/combine-events-by-publish-date-in-mutli-cpt-query\/","article_modified_time":"2015-09-08T14:42:11+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\/combine-events-by-publish-date-in-mutli-cpt-query\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/combine-events-by-publish-date-in-mutli-cpt-query\/","name":"Combine Events, by publish date, in mutli CPT query -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-09-03T13:13:35+00:00","dateModified":"2015-09-08T14:42:11+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/combine-events-by-publish-date-in-mutli-cpt-query\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/combine-events-by-publish-date-in-mutli-cpt-query\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/combine-events-by-publish-date-in-mutli-cpt-query\/#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":"Combine Events, by publish date, in mutli CPT query"}]},{"@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\/1001572","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":2,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1001572\/revisions"}],"predecessor-version":[{"id":1001575,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1001572\/revisions\/1001575"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1001572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}