Home › Forums › Calendar Products › Community Events › Issue with template
- This topic has 3 replies, 2 voices, and was last updated 10 years, 4 months ago by
George.
-
AuthorPosts
-
December 9, 2015 at 10:14 am #1038346
Robert
ParticipantHello,
I’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’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.
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
If you continue to do any other filtering it will additionally repeat these events.
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.
Hello,
I’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’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.
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
If you continue to do any other filtering it will additionally repeat these events.
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.
// Ensure the global $post variable is in scope global $post; // Retrieve the next 5 upcoming events $events = tribe_get_events( array( 'posts_per_page' => 5, //'start_date' => new DateTime() ) ); echo '<ul id="upcoming-events">'; // Loop through the events: set up each one as // the current post then use template tags to // display the title and content foreach ( $events as $post ) { setup_postdata( $post ); echo '<li>'; // This time, let's throw in an event-specific // template tag to show the date after the title! echo '<a href="' . get_permalink() . '">'; echo the_title(); echo '</a>'; echo '<br />'; echo '<strong>When: </strong>' . tribe_get_start_date(); echo '<br />'; echo '<strong>Where: </strong>' . tribe_get_venue(); if (tribe_get_city() !='') : echo ' - ' . tribe_get_city(); endif; if (tribe_get_state() !='') : echo ', ' . tribe_get_state(); endif; //echo tribe_get_city(); echo '<br />'; echo '</li>'; } echo '</ul>';Please advise.
-
This topic was modified 10 years, 4 months ago by
Robert.
December 9, 2015 at 10:23 am #1038352George
ParticipantHey @Lindsay,
We’re unfortunately not able to help with issues arising from customizations. Check out the “Product Support” section of our terms for more information about this → http://theeventscalendar.com/terms
I took a look at the link you provided regardless, but didn’t find the exact issue you described. When I tried adding filters, nothing happened on the page at all, whether filtering or the duplication issue you described.
—
Also, I looked through all of your forum topics but could not find anyone on our staff recommending that code for you to use. Can you please link to where you found this code? If it is from some other thread on these forums from a long time ago, for example, then unfortunately that code was probably posted several product versions ago, and so the code of our products themselves have changed since then which makes the custom code example almost useless.
I’m sorry if any of that news is disappointing; I just want to be clear about that code and about the extremely limited support we can provide for anything relating to customizations.
This does not mean I cannot help at all, though – please let me know what you think about all of this and what further questions you have, if any.
Sincerely,
GeorgeDecember 9, 2015 at 11:46 am #1038397December 9, 2015 at 12:34 pm #1038430George
ParticipantThanks Lindsay – I appreciate the information here. I unfortunately do not have further recommendations about what to do here and cannot help further with the custom development you need 🙁
I’m sorry to bear that news. I will close this thread for now.
Sincerely,
George -
This topic was modified 10 years, 4 months ago by
-
AuthorPosts
- The topic ‘Issue with template’ is closed to new replies.
