{"id":1038346,"date":"2015-12-09T10:14:15","date_gmt":"2015-12-09T18:14:15","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/issue-with-template\/"},"modified":"2015-12-09T12:34:43","modified_gmt":"2015-12-09T20:34:43","slug":"issue-with-template","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/issue-with-template\/","title":{"rendered":"Issue with template"},"content":{"rendered":"<p>Hello,<\/p>\n<p>I&#8217;m having issues with a list of upcoming events showing over and over again. <\/p>\n<p>On my page here: http:\/\/workshops.lindsayadlerphotography.com\/events you will see that I created and modified the template event&#8217;s month view template to include a list of upcoming events. It looks and works fine when you first land on the page as seen here: http:\/\/cl.ly\/3c0K271t3J2D. <\/p>\n<p>However, when I select any options to filter or search (such as selecting the date March 2016) it duplicates the list of events on every successive filter view. The only way to duplicate it is if you use one of the filters as mentioned above. As seen here: http:\/\/cl.ly\/203u2j0L003V<\/p>\n<p>If you continue to do any other filtering it will additionally repeat these events. <\/p>\n<p>I added this code as per the instruction and examples given to me by the staff. You can see the code below to content.php in the month folder. <\/p>\n<p>Hello,<\/p>\n<p>I&#8217;m having issues with a list of upcoming events showing over and over again. <\/p>\n<p>On my page here: http:\/\/workshops.lindsayadlerphotography.com\/events you will see that I created and modified the template event&#8217;s month view template to include a list of upcoming events. It looks and works fine when you first land on the page as seen here: http:\/\/cl.ly\/3c0K271t3J2D. <\/p>\n<p>However, when I select any options to filter or search (such as selecting the date March 2016) it duplicates the list of events on every successive filter view. The only way to duplicate it is if you use one of the filters as mentioned above. As seen here: http:\/\/cl.ly\/203u2j0L003V<\/p>\n<p>If you continue to do any other filtering it will additionally repeat these events. <\/p>\n<p>I added this code as per the instruction and examples given to me by the staff. You can see the code below to content.php in the month folder. <\/p>\n<pre><code>\n\/\/ Ensure the global $post variable is in scope\nglobal $post;\n \n\/\/ Retrieve the next 5 upcoming events\n$events = tribe_get_events( array(\n    &#039;posts_per_page&#039; =&gt; 5,\n    \/\/&#039;start_date&#039; =&gt; new DateTime()\n) );\n \n echo &#039;&lt;ul id=&quot;upcoming-events&quot;&gt;&#039;; \n \n \n\/\/ Loop through the events: set up each one as\n\/\/ the current post then use template tags to\n\/\/ display the title and content\nforeach ( $events as $post ) {\n    setup_postdata( $post );\n    \n    echo &#039;&lt;li&gt;&#039;; \n \n    \/\/ This time, let&#039;s throw in an event-specific\n    \/\/ template tag to show the date after the title!\n    echo &#039;&lt;a href=&quot;&#039; . get_permalink() . &#039;&quot;&gt;&#039;; echo the_title();  echo &#039;&lt;\/a&gt;&#039;;  \n    echo &#039;&lt;br \/&gt;&#039;; \n    echo &#039;&lt;strong&gt;When: &lt;\/strong&gt;&#039; . tribe_get_start_date();\n    echo &#039;&lt;br \/&gt;&#039;; \n    echo &#039;&lt;strong&gt;Where: &lt;\/strong&gt;&#039; . tribe_get_venue(); if (tribe_get_city() !=&#039;&#039;) : echo &#039; - &#039; . tribe_get_city();  endif; if (tribe_get_state() !=&#039;&#039;) :  echo &#039;, &#039; . tribe_get_state(); endif; \n    \/\/echo tribe_get_city(); \n    \n    echo &#039;&lt;br \/&gt;&#039;; \n    \n    echo &#039;&lt;\/li&gt;&#039;; \n}\n\necho &#039;&lt;\/ul&gt;&#039;;\n<\/code><\/pre>\n<p>Please advise.<\/p>\n","protected":false},"template":"","class_list":["post-1038346","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>Issue with template -<\/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\/issue-with-template\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Issue with template -\" \/>\n<meta property=\"og:description\" content=\"Hello, I&#8217;m having issues with a list of upcoming events showing over and over again. On my page here: http:\/\/workshops.lindsayadlerphotography.com\/events you will see that I created and modified the template event&#8217;s month view template to include a list of upcoming events. It looks and works fine when you first land on the page as seen [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/issue-with-template\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-12-09T20:34:43+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=\"3 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\/issue-with-template\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/issue-with-template\/\",\"name\":\"Issue with template -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-12-09T18:14:15+00:00\",\"dateModified\":\"2015-12-09T20:34:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/issue-with-template\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/issue-with-template\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/issue-with-template\/#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\":\"Community Events\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/community-events\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Issue with template\"}]},{\"@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":"Issue with template -","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\/issue-with-template\/","og_locale":"en_US","og_type":"article","og_title":"Issue with template -","og_description":"Hello, I&#8217;m having issues with a list of upcoming events showing over and over again. On my page here: http:\/\/workshops.lindsayadlerphotography.com\/events you will see that I created and modified the template event&#8217;s month view template to include a list of upcoming events. It looks and works fine when you first land on the page as seen [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/issue-with-template\/","article_modified_time":"2015-12-09T20:34:43+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/issue-with-template\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/issue-with-template\/","name":"Issue with template -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-12-09T18:14:15+00:00","dateModified":"2015-12-09T20:34:43+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/issue-with-template\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/issue-with-template\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/issue-with-template\/#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":"Community Events","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/community-events\/"},{"@type":"ListItem","position":5,"name":"Issue with template"}]},{"@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\/1038346","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\/1038346\/revisions"}],"predecessor-version":[{"id":1038347,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1038346\/revisions\/1038347"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1038346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}