{"id":14825,"date":"2012-02-07T13:48:58","date_gmt":"2012-02-07T21:48:58","guid":{"rendered":"http:\/\/tri.be\/support\/forums\/topic\/limit-categories-pulled-in-events-query-2\/"},"modified":"2012-02-07T13:48:58","modified_gmt":"2012-02-07T21:48:58","slug":"limit-categories-pulled-in-events-query-2","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/limit-categories-pulled-in-events-query-2\/","title":{"rendered":"Limit Categories pulled in Events Query"},"content":{"rendered":"<p>If you check out http:\/\/aia.imagebox.com you will see we have a section on the homepage which has 3 tabs on &#8220;Columns, &#8220;News&#8221;, &#8220;Events&#8221;  Within the events tab we have it coded so that it pulls an excerpt of an event in the main column and in the sidecolumn of the tab it has additional events.<\/p>\n<p>My question is 2 fold.  First in the left column of this tab we want to limit this section to exclude certain categories.  Basically we are using this section to &#8220;feature&#8221; an event.  We will have both company sponsored events and public events.  We only want our company sponsored events to ever show up in this larger block in column 1.  Currently we are using the following code snippet to do this in our theme:<\/p>\n<p>http:\/\/pastebin.com\/UJbDAneh<\/p>\n<p>Is there any other paramaters to inject at &#8216;eventDisplay&#8217;=&gt;&#8217;all&#8217;,<br \/>\nCan we limit this to only category id #&#8217;s which contain company sponsored events?<\/p>\n<p>The second part to my question is:<br \/>\nHow can we limit this to only pull an upcoming event.  As you can see now its pulling an event from January.  Obviously that has passed an shouldn&#8217;t be shown on the homepage an upcoming event.  I realize normally WordPress just pulls from the DB based on POST DATE and not the event date.<br \/>\nThis same question applies to the upcoming events in the right column of this tab. They also should be limited to events in the future. Right now its showing events from Feb 1 and Feb 21.  The Feb 1 shouldn&#8217;t be showing since its past.  Is there some sort of query I can run to pull upcoming events only and do it to sort by EVENT date instead of POST date?<\/p>\n","protected":false},"template":"","class_list":["post-14825","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>Limit Categories pulled in Events 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\/limit-categories-pulled-in-events-query-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Limit Categories pulled in Events Query -\" \/>\n<meta property=\"og:description\" content=\"If you check out http:\/\/aia.imagebox.com you will see we have a section on the homepage which has 3 tabs on &#8220;Columns, &#8220;News&#8221;, &#8220;Events&#8221; Within the events tab we have it coded so that it pulls an excerpt of an event in the main column and in the sidecolumn of the tab it has additional events. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/limit-categories-pulled-in-events-query-2\/\" \/>\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\/limit-categories-pulled-in-events-query-2\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/limit-categories-pulled-in-events-query-2\/\",\"name\":\"Limit Categories pulled in Events Query -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2012-02-07T21:48:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/limit-categories-pulled-in-events-query-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/limit-categories-pulled-in-events-query-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/limit-categories-pulled-in-events-query-2\/#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\":\"Limit Categories pulled in Events 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":"Limit Categories pulled in Events 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\/limit-categories-pulled-in-events-query-2\/","og_locale":"en_US","og_type":"article","og_title":"Limit Categories pulled in Events Query -","og_description":"If you check out http:\/\/aia.imagebox.com you will see we have a section on the homepage which has 3 tabs on &#8220;Columns, &#8220;News&#8221;, &#8220;Events&#8221; Within the events tab we have it coded so that it pulls an excerpt of an event in the main column and in the sidecolumn of the tab it has additional events. [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/limit-categories-pulled-in-events-query-2\/","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\/limit-categories-pulled-in-events-query-2\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/limit-categories-pulled-in-events-query-2\/","name":"Limit Categories pulled in Events Query -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2012-02-07T21:48:58+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/limit-categories-pulled-in-events-query-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/limit-categories-pulled-in-events-query-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/limit-categories-pulled-in-events-query-2\/#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":"Limit Categories pulled in Events 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\/14825","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\/14825\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=14825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}