{"id":1094878,"date":"2016-03-28T10:49:39","date_gmt":"2016-03-28T17:49:39","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_venue-not-working\/"},"modified":"2016-04-20T09:35:05","modified_gmt":"2016-04-20T16:35:05","slug":"tribe_get_venue-not-working","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_venue-not-working\/","title":{"rendered":"tribe_get_venue not working"},"content":{"rendered":"<p>I&#8217;m trying to make a list of the latest upcoming events, Ive got everything working EXCEPT pulling the event venue name you can see this in the &#8220;Upcoming Events&#8221; section here http:\/\/spia.staging.wpengine.com\/ and the following is my code&#8230;<\/p>\n<p>\t\t\t\t\t\t&lt;?php<br \/>\n\t\t\t\t\t\t$posts = get_posts(array(<br \/>\n\t\t\t\t\t\t\t&#8216;post_type&#8217; =&gt; &#8216;tribe_events&#8217;,<br \/>\n\t\t\t\t\t\t\t&#8216;order&#8217;            =&gt; &#8216;ASC&#8217;,<br \/>\n\t\t\t\t\t\t\t&#8216;orderby&#8217;         =&gt; &#8216;meta_value&#8217;,<br \/>\n\t\t\t\t\t\t\t&#8216;meta_key&#8217;    =&gt; &#8216;_EventStartDate&#8217;,<br \/>\n\t\t\t\t\t\t\t&#8216;posts_per_page&#8217;\t=&gt; 3,<br \/>\n\t\t\t\t\t\t\t&#8216;post__in&#8217;\t=&gt; $post_ids,<br \/>\n\t\t\t\t\t\t\t&#8216;meta_query&#8217; =&gt; array(<br \/>\n\t\t\t\t\t\t\t  array(<br \/>\n\t\t\t\t\t\t\t    &#8216;key&#8217; =&gt; &#8216;_EventStartDate&#8217;,<br \/>\n\t\t\t\t\t\t\t    &#8216;value&#8217; =&gt; date(&#8220;Y-m-d H:i&#8221;),<br \/>\n\t\t\t\t\t\t\t    &#8216;compare&#8217; =&gt; &#8216;&gt;=&#8217;,<br \/>\n\t\t\t\t\t\t\t    &#8216;type&#8217; =&gt; &#8216;DATE&#8217;<br \/>\n\t\t\t\t\t\t\t    )<br \/>\n\t\t\t\t\t\t\t  )<br \/>\n\t\t\t\t\t\t));<br \/>\n\t\t\t\t\t\tif( $posts ) { ?&gt;<br \/>\n\t\t\t\t\t\t&lt;div id=&#8221;events&#8221;&gt;<br \/>\n\t\t\t\t\t\t&lt;?php foreach( $posts as $post): ?&gt;<br \/>\n\t\t\t\t\t\t&lt;?php setup_postdata($post); ?&gt;<br \/>\n\t\t\t\t\t\t\t&lt;div class=&#8221;event&#8221;&gt;<br \/>\n\t\t\t\t\t\t\t\t&lt;div &lt;?php post_class() ?&gt; id=&#8221;post-&lt;?php the_ID(); ?&gt;&#8221;&gt;<br \/>\n\t\t\t\t\t\t\t\t\t&lt;div class=&#8221;table&#8221;&gt;<br \/>\n\t\t\t\t\t\t\t\t\t\t&lt;div class=&#8221;table-cell&#8221;&gt;<br \/>\n\t\t\t\t\t\t\t\t\t\t\t&lt;div class=&#8221;event-date-box&#8221;&gt;<br \/>\n\t\t\t\t\t\t\t\t\t\t\t\t&lt;span class=&#8221;month&#8221;&gt;&lt;?php echo tribe_get_start_date($postID, true, &#8216;M&#8217;); ?&gt;&lt;\/span&gt;<br \/>\n\t\t\t\t\t\t\t\t\t\t\t\t&lt;span class=&#8221;day&#8221;&gt;&lt;?php echo tribe_get_start_date($postID, true, &#8216;j&#8217;); ?&gt;&lt;\/span&gt;<br \/>\n\t\t\t\t\t\t\t\t\t\t\t&lt;\/div&gt;<br \/>\n\t\t\t\t\t\t\t\t\t\t&lt;\/div&gt;<br \/>\n\t\t\t\t\t\t\t\t\t\t&lt;div class=&#8221;table-cell&#8221;&gt;<br \/>\n\t\t\t\t\t\t\t\t\t\t\t&lt;div class=&#8221;entry&#8221;&gt;<\/p>\n<h5><a>&#8221; title=&#8221;&lt;?php the_title(); ?&gt;&#8221;&gt;&lt;?php the_title(); ?&gt;<\/a><\/h5>\n<p>\t\t\t\t\t\t\t\t\t\t\t\t&lt;?php if(get_field(&#8216;sponsor&#8217;)) : ?&gt;&lt;p class=&#8221;sponsor&#8221;&gt;SPONSOR: &lt;?php the_field(&#8216;sponsor&#8217;); ?&gt;&lt;\/p&gt;&lt;?php else: ?&gt;&lt;?php endif; ?&gt;<br \/>\n\t\t\t\t\t\t\t\t\t\t\t\t&lt;div class=&#8221;event-time&#8221;&gt;&lt;?php echo tribe_get_start_date($post, false, $format = &#8216;g:i A&#8217; ) . &#8216; &#8211; &#8216; . tribe_get_end_date($post, false, $format = &#8216;g:i A&#8217;); ?&gt;&lt;\/div&gt;<br \/>\n\t\t\t\t\t\t\t\t\t\t\t\t&lt;?php echo tribe_get_venue($postID, true) ?&gt;<br \/>\n\t\t\t\t\t\t\t\t\t\t\t&lt;\/div&gt;<br \/>\n\t\t\t\t\t\t\t\t\t\t&lt;\/div&gt;<br \/>\n\t\t\t\t\t\t\t\t\t&lt;\/div&gt;<br \/>\n\t\t\t\t\t\t\t\t&lt;\/div&gt;<br \/>\n\t\t\t\t\t\t\t&lt;\/div&gt;<br \/>\n\t\t\t\t\t\t&lt;?php endforeach; ?&gt;<br \/>\n\t\t\t\t\t\t&lt;\/div&gt;<br \/>\n\t\t\t\t\t\t&lt;?php } ?&gt;<\/p>\n","protected":false},"template":"","class_list":["post-1094878","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>tribe_get_venue not working -<\/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\/tribe_get_venue-not-working\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"tribe_get_venue not working -\" \/>\n<meta property=\"og:description\" content=\"I&#8217;m trying to make a list of the latest upcoming events, Ive got everything working EXCEPT pulling the event venue name you can see this in the &#8220;Upcoming Events&#8221; section here http:\/\/spia.staging.wpengine.com\/ and the following is my code&#8230; &lt;?php $posts = get_posts(array( &#8216;post_type&#8217; =&gt; &#8216;tribe_events&#8217;, &#8216;order&#8217; =&gt; &#8216;ASC&#8217;, &#8216;orderby&#8217; =&gt; &#8216;meta_value&#8217;, &#8216;meta_key&#8217; =&gt; &#8216;_EventStartDate&#8217;, &#8216;posts_per_page&#8217; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_venue-not-working\/\" \/>\n<meta property=\"article:modified_time\" content=\"2016-04-20T16:35:05+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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_venue-not-working\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_venue-not-working\/\",\"name\":\"tribe_get_venue not working -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-03-28T17:49:39+00:00\",\"dateModified\":\"2016-04-20T16:35:05+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_venue-not-working\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_venue-not-working\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_venue-not-working\/#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\":\"tribe_get_venue not working\"}]},{\"@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":"tribe_get_venue not working -","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\/tribe_get_venue-not-working\/","og_locale":"en_US","og_type":"article","og_title":"tribe_get_venue not working -","og_description":"I&#8217;m trying to make a list of the latest upcoming events, Ive got everything working EXCEPT pulling the event venue name you can see this in the &#8220;Upcoming Events&#8221; section here http:\/\/spia.staging.wpengine.com\/ and the following is my code&#8230; &lt;?php $posts = get_posts(array( &#8216;post_type&#8217; =&gt; &#8216;tribe_events&#8217;, &#8216;order&#8217; =&gt; &#8216;ASC&#8217;, &#8216;orderby&#8217; =&gt; &#8216;meta_value&#8217;, &#8216;meta_key&#8217; =&gt; &#8216;_EventStartDate&#8217;, &#8216;posts_per_page&#8217; [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_venue-not-working\/","article_modified_time":"2016-04-20T16:35:05+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_venue-not-working\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_venue-not-working\/","name":"tribe_get_venue not working -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-03-28T17:49:39+00:00","dateModified":"2016-04-20T16:35:05+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_venue-not-working\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_venue-not-working\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_venue-not-working\/#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":"tribe_get_venue not working"}]},{"@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\/1094878","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\/1094878\/revisions"}],"predecessor-version":[{"id":1095182,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1094878\/revisions\/1095182"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1094878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}