{"id":1154973,"date":"2016-08-23T12:07:57","date_gmt":"2016-08-23T19:07:57","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grabbing-venue-city-in-loop\/"},"modified":"2016-08-23T12:07:57","modified_gmt":"2016-08-23T19:07:57","slug":"grabbing-venue-city-in-loop","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grabbing-venue-city-in-loop\/","title":{"rendered":"Grabbing Venue City in Loop"},"content":{"rendered":"<p>I have a function that is grabbing a bunch of meta keys and displaying them in a loop on the home page.  I am trying to figure out how to grab the venue city for each of the items. Below is what I can come up with based on your docs, but it keeps coming up blank.  The start of the code below has been successful grabbing the start date, end date, and cost.  <\/p>\n<pre><code> $i = 0;\n        foreach ($events as $event) {\n                       $meta = get_post_meta($event-&gt;ID);\n\t\t\t$localeze =  $meta[&#039;_VenueCity&#039;][0];<\/code><\/pre>\n<p>I also tried using<br \/>\n<code>$meta2 = $meta[&#039;_EventVenueID&#039;][0];<\/code><\/p>\n<p>This only returned the id number, but it did work.<\/p>\n","protected":false},"template":"","class_list":["post-1154973","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>Grabbing Venue City in Loop -<\/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\/grabbing-venue-city-in-loop\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Grabbing Venue City in Loop -\" \/>\n<meta property=\"og:description\" content=\"I have a function that is grabbing a bunch of meta keys and displaying them in a loop on the home page. I am trying to figure out how to grab the venue city for each of the items. Below is what I can come up with based on your docs, but it keeps coming [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grabbing-venue-city-in-loop\/\" \/>\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\/grabbing-venue-city-in-loop\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grabbing-venue-city-in-loop\/\",\"name\":\"Grabbing Venue City in Loop -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-08-23T19:07:57+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grabbing-venue-city-in-loop\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grabbing-venue-city-in-loop\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grabbing-venue-city-in-loop\/#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\":\"Grabbing Venue City in Loop\"}]},{\"@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":"Grabbing Venue City in Loop -","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\/grabbing-venue-city-in-loop\/","og_locale":"en_US","og_type":"article","og_title":"Grabbing Venue City in Loop -","og_description":"I have a function that is grabbing a bunch of meta keys and displaying them in a loop on the home page. I am trying to figure out how to grab the venue city for each of the items. Below is what I can come up with based on your docs, but it keeps coming [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grabbing-venue-city-in-loop\/","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\/grabbing-venue-city-in-loop\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grabbing-venue-city-in-loop\/","name":"Grabbing Venue City in Loop -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-08-23T19:07:57+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grabbing-venue-city-in-loop\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/grabbing-venue-city-in-loop\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/grabbing-venue-city-in-loop\/#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":"Grabbing Venue City in Loop"}]},{"@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\/1154973","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\/1154973\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1154973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}