{"id":1371212,"date":"2017-10-30T01:30:35","date_gmt":"2017-10-30T08:30:35","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-event\/"},"modified":"2017-10-30T01:30:35","modified_gmt":"2017-10-30T08:30:35","slug":"filter-event","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-event\/","title":{"rendered":"Filter event"},"content":{"rendered":"<p>Hi,<\/p>\n<p>Excuse for my english..<br \/>\nI would like to add the category with my code next.<br \/>\nDo you have a issue please ?<br \/>\nThanks of lot.<br \/>\nSee you bye<\/p>\n<pre><code>\n<\/code><\/pre>\n<p>$events = tribe_get_events( array(<\/p>\n<p>$args = array(<br \/>\n  &#8216;nopaging&#8217; =&gt; true,<br \/>\n  &#8216;post_type&#8217;=&gt;&#8217;tribe_venue&#8217;,<\/p>\n<p>\t  &#8216;meta_query&#8217; =&gt; array(<br \/>\n\t\tarray(<br \/>\n\t\t   &#8216;key&#8217; =&gt; &#8216;_VenueCity&#8217;,<br \/>\n\t\t   &#8216;value&#8217; =&gt; array( &#8216;Frankfurt&#8217;),<br \/>\n\t\t   &#8216;compare&#8217; =&gt; &#8216;IN&#8217;<br \/>\n\t\t)),<\/p>\n<p>\t\t&#8216;tax_query&#8217; =&gt; array(<br \/>\n\t\t\tarray(<br \/>\n\t\t\t\t\t&#8216;taxonomy&#8217; =&gt; TribeEvents::TAXONOMY,<br \/>\n\t\t\t\t\t&#8216;post_status&#8217;=&gt;&#8217;publish&#8217;,<br \/>\n\t\t\t\t\t&#8216;field&#8217; =&gt; &#8216;id&#8217;,<br \/>\n\t\t\t\t\t&#8216;terms&#8217; =&gt; &#8216;Sport&#8217;<br \/>\n\t\t\t))<\/p>\n<p>)));<\/p>\n<p>$city_venue = get_posts( $args );<br \/>\n$venue_ids = wp_list_pluck( $city_venue, &#8216;ID&#8217; );<br \/>\nwp_reset_postdata();<\/p>\n<p>$upcoming = new WP_Query( array(<br \/>\n&#8216;post_type&#8217; =&gt; Tribe__Events__Main::POSTTYPE,<br \/>\n&#8216;meta_query&#8217; =&gt; array(<br \/>\narray(<br \/>\n&#8216;key&#8217; =&gt; &#8216;_EventVenueID&#8217;,<br \/>\n&#8216;value&#8217; =&gt; $venue_ids,<br \/>\n&#8216;compare&#8217; =&gt; &#8216;IN&#8217;,<br \/>\n)<br \/>\n),<br \/>\n&#8216;paged&#8217; =&gt; $paged<br \/>\n) );<\/p>\n<p>if( $upcoming-&gt;have_posts()) :<br \/>\nwhile( $upcoming-&gt;have_posts() ): $upcoming-&gt;the_post();<br \/>\necho &#8216;<br \/>\n&#8216; . $upcoming-&gt;post-&gt;post_title . &#8216;<br \/>\n&#8216;;<br \/>\nendwhile;<br \/>\nwp_reset_postdata();<br \/>\nelse :<br \/>\necho &#8216;No posts found&#8217;;<br \/>\nendif;<\/p>\n<p>die();<\/p>\n<p>?&gt;<\/p>\n","protected":false},"template":"","class_list":["post-1371212","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>Filter 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\/filter-event\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Filter event -\" \/>\n<meta property=\"og:description\" content=\"Hi, Excuse for my english.. I would like to add the category with my code next. Do you have a issue please ? Thanks of lot. See you bye $events = tribe_get_events( array( $args = array( &#8216;nopaging&#8217; =&gt; true, &#8216;post_type&#8217;=&gt;&#8217;tribe_venue&#8217;, &#8216;meta_query&#8217; =&gt; array( array( &#8216;key&#8217; =&gt; &#8216;_VenueCity&#8217;, &#8216;value&#8217; =&gt; array( &#8216;Frankfurt&#8217;), &#8216;compare&#8217; =&gt; &#8216;IN&#8217; )), [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-event\/\" \/>\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\/filter-event\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-event\/\",\"name\":\"Filter event -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-10-30T08:30:35+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-event\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-event\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-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\":\"Welcome!\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/_welcome\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Pre-Sales Questions\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/_welcome\/pre-sales-questions\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Filter 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":"Filter 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\/filter-event\/","og_locale":"en_US","og_type":"article","og_title":"Filter event -","og_description":"Hi, Excuse for my english.. I would like to add the category with my code next. Do you have a issue please ? Thanks of lot. See you bye $events = tribe_get_events( array( $args = array( &#8216;nopaging&#8217; =&gt; true, &#8216;post_type&#8217;=&gt;&#8217;tribe_venue&#8217;, &#8216;meta_query&#8217; =&gt; array( array( &#8216;key&#8217; =&gt; &#8216;_VenueCity&#8217;, &#8216;value&#8217; =&gt; array( &#8216;Frankfurt&#8217;), &#8216;compare&#8217; =&gt; &#8216;IN&#8217; )), [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-event\/","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\/filter-event\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-event\/","name":"Filter event -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-10-30T08:30:35+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-event\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-event\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/filter-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":"Welcome!","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/_welcome\/"},{"@type":"ListItem","position":4,"name":"Pre-Sales Questions","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/_welcome\/pre-sales-questions\/"},{"@type":"ListItem","position":5,"name":"Filter 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\/1371212","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\/1371212\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1371212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}