Home › Forums › Calendar Products › Events Calendar PRO › List View Past Events Removal
- This topic has 13 replies, 4 voices, and was last updated 9 years, 6 months ago by
Dragan.
-
AuthorPosts
-
October 14, 2016 at 3:38 pm #1176908
Dragan
ParticipantI have the Events Calendar PRO installed for List View and was wondering why the events still show up when the event has passed. I added the snippet so they are in ascending order but would like for them to not show up when the event is done.
October 14, 2016 at 4:07 pm #1176939Cliff
MemberHi Dragan. Thanks for your question.
I believe our List View starts by displaying the current events but only displays past events if someone clicks to view “Previous Events”. You can see this is how our demo site operates: http://wpshindig.com/events/list/
If this isn’t how your site is operating, I’d suggest following our recommended troubleshooting steps:
There might be some new updates available. Could you please make sure all your Modern Tribe plugins (and WordPress core) are at their latest versions?
Once you verify you’re on the latest versions, please test to see if the issue is still happening for you.
If it is, please follow our Testing for Conflicts Guide (basically switch to TwentySixteen theme and deactivate all plugins and custom code other than Modern Tribe plugins) and see if that helps narrow down the cause of this.
If it doesn’t, please enable WP_DEBUG and WP_DEBUG_LOG and share any PHP errors you see while changing tickets quantity, navigating your site’s home page, events page, single-event pages, and any other of your site’s pages relevant to this ticket.
Then, please share your System Information (while in Testing for Conflicts mode).
You might also see if you can spot any console errors at your site. (If needed, you may reference our KB article Using Google Chrome Developer Tools.)
Let us know what you find out.
Thanks.
October 16, 2016 at 1:17 pm #1177506Dragan
ParticipantI will try my best to troubleshoot the issue.
Here is the link to the events and how they are displayed: miamibeachmag.com/eventsOctober 17, 2016 at 7:43 am #1177666Cliff
MemberHere’s a video with my audio commentary — basically just saying your list of events jumps around and is out of order: https://cl.ly/3p0J3z290B0T — and therefore something’s definitly going on that should be resolved.
You can see our demo site’s Events List View at http://wpshindig.com/events/list/
Let me know how your troubleshooting goes.
October 17, 2016 at 6:34 pm #1178078Dragan
ParticipantHi Cliff,
That is definitely my issue. It’s still showing events from last December when even though they are existing posts, they should not be visible on the events page. I’m not too sure why. I installed the Events Calendar PRO and have the latest WP installed.
Any ideas as to what it could be?
October 17, 2016 at 7:53 pm #1178115Cliff
MemberYou previously stated:
I added the snippet so they are in ascending order…
What code snippet did you add?
If you remove it, does your List View display your events in order, as they should like our demo site’s List View (link in my previous reply)?
October 17, 2016 at 8:29 pm #1178124Dragan
Participant// Changes listed event views to reverse chronological order
function tribe_past_reverse_chronological ($post_object) {
$past_ajax = (defined( ‘DOING_AJAX’ ) && DOING_AJAX && $_REQUEST[‘tribe_event_display’] === ‘upcoming’) ? true : false;
if(tribe_is_past() || tribe_is_upcoming() || $past_ajax) {
$post_object = array_reverse($post_object);
}
return $post_object;
}
add_filter(‘the_posts’, ‘tribe_past_reverse_chronological’, 100);—————–
This is the snippet I found in the forums for ascending order. It works.
When I remove it the events go back to descending order.October 17, 2016 at 9:10 pm #1178138Cliff
MemberWhen I remove it the events go back to descending order.
But the events looked out of order. When you remove this snippet, do your events appear in order but in descending order?
If they’re still out of order, there’s something else affecting things. Please let me know the answer to the above question.
October 18, 2016 at 3:19 pm #1178726Dragan
ParticipantHi Cliff,
They are still out of order when I remove the snippet. I am using a test site now instead of making the changes on that site. I feel it will be easier this easy until I find the solution.
Any ideas?
October 19, 2016 at 3:05 am #1178961Cliff
MemberDefinitely a good idea to do your troubleshooting on the test version of your site!
Please closely follow along the steps I outlined in my initial reply, above, to remedy the events being out of order. That’ll be a good point to then try to move forward if all else seems to be working fine.
Thanks for your efforts here.
October 19, 2016 at 11:22 pm #1179675Dragan
ParticipantNot finding a solution to this. I installed everything again and still doesn’t seem to work. Using the the most recent versions as well. When I add an event it just goes to the top rather than in the section where it should.
October 20, 2016 at 9:52 am #1179935Cliff
MemberComment out this line in your theme’s functions.php file (assuming that’s where it’s located):
add_filter(‘the_posts’, ‘tribe_past_reverse_chronological’, 100);Then check if your events appear in order like http://wpshindig.com/events/list/. If they don’t, start troubleshooting:
With all non-Modern Tribe plugins deactivated and using Twenty Sixteen theme, do the events appear in the default order?
If yes, activate your theme. Then do the events still appear in the default order?
If yes, activate your plugins (some at a time or all of them if you prefer). Then do they appear in the default order?
If yes, then un-comment that snippet and see if that’s the only thing causing the display issue (not sorted perfectly / events out of order).
November 11, 2016 at 8:35 am #1190907Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘List View Past Events Removal’ is closed to new replies.
