{"id":1441552,"date":"2018-02-01T05:46:13","date_gmt":"2018-02-01T13:46:13","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/error-in-code-on-website\/"},"modified":"2018-02-01T05:46:13","modified_gmt":"2018-02-01T13:46:13","slug":"error-in-code-on-website","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/error-in-code-on-website\/","title":{"rendered":"Error in code on website."},"content":{"rendered":"<p>Hello:<\/p>\n<p>On https:\/\/theeventscalendar.com\/knowledgebase\/using-tribe_get_events\/<br \/>\nThere appears to be no consistency on the page for the end for loop bracket. The first code example has the for-loop with a correct end bracket but the remaining code examples omits the }.<\/p>\n<p>I personally would add in the } to have a complete code snippet.<\/p>\n<p>Also I am unsure about the current use of the &#8216;global $post;&#8217; variable. Is this considered a best or good practice to call a global variable?<\/p>\n<p>Thank you,<\/p>\n<p>Richard Krone<br \/>\nInternet and Social Media Administrator<br \/>\nInformation Technology Department, County of Erie<br \/>\nPhone (814) 451-7672<\/p>\n","protected":false},"template":"","class_list":["post-1441552","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>Error in code on website. -<\/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\/error-in-code-on-website\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Error in code on website. -\" \/>\n<meta property=\"og:description\" content=\"Hello: On https:\/\/theeventscalendar.com\/knowledgebase\/using-tribe_get_events\/ There appears to be no consistency on the page for the end for loop bracket. The first code example has the for-loop with a correct end bracket but the remaining code examples omits the }. I personally would add in the } to have a complete code snippet. Also I am unsure [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/error-in-code-on-website\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/error-in-code-on-website\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/error-in-code-on-website\/\",\"name\":\"Error in code on website. -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2018-02-01T13:46:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/error-in-code-on-website\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/error-in-code-on-website\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/error-in-code-on-website\/#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\":\"Error in code on website.\"}]},{\"@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":"Error in code on website. -","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\/error-in-code-on-website\/","og_locale":"en_US","og_type":"article","og_title":"Error in code on website. -","og_description":"Hello: On https:\/\/theeventscalendar.com\/knowledgebase\/using-tribe_get_events\/ There appears to be no consistency on the page for the end for loop bracket. The first code example has the for-loop with a correct end bracket but the remaining code examples omits the }. I personally would add in the } to have a complete code snippet. Also I am unsure [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/error-in-code-on-website\/","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/error-in-code-on-website\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/error-in-code-on-website\/","name":"Error in code on website. -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2018-02-01T13:46:13+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/error-in-code-on-website\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/error-in-code-on-website\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/error-in-code-on-website\/#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":"Error in code on website."}]},{"@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\/1441552","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\/1441552\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1441552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}