Home › Forums › Calendar Products › Events Calendar PRO › List View showing yesterday's events first?
- This topic has 23 replies, 3 voices, and was last updated 12 years, 2 months ago by Rob.
-
AuthorPosts
-
December 23, 2011 at 8:03 am #12645nakturnalParticipant
Hi there, we just upgraded to 2.0.2 and everything is working great. The one thing that I noticed is the list view (the default for the /events section) and the widget are showing yesterday’s events still. The date/time is set correctly on WP and I added the date.php patch just in case.
I was having some issues with saving Widgets on the site and I had to Enable Accessibility Mode in order to get them to work properly. I’m not sure what was causing this, either, but maybe it is something to do with caching on the site? There is no cache plugin installed (there is one in the plugins folder but it’s not active) and no caching that I know of for the server.
Any assistance would be greatly appreciated! You can email me directly (not sure when Leigh will be around to reply) at Shane [at] Nakturnal.net and I can email access to the site.
The events in question can be seen at: http://www.nakyouout.com/events/
Thank you!
~ShaneDecember 23, 2011 at 8:06 am #12646nakturnalParticipantAnd also, the Single Venue’s pages are also showing old events instead of “upcoming” events. One of them shows events from back in April even though there are multiple events Dec – Jan coming up.
Thanks!
December 26, 2011 at 2:03 pm #12682JonahParticipantHi Leigh,
Very sorry about the troubles. Have you tried disabling other plugins and/or reverting to the Twenty Eleven theme to rule out plugin or theme conflicts? Unfortunately I don’t know what else could be causing this and most of the team is away until Jan. 2nd. I’ll put this on the list of issues to tackle once everyone is back and we’ll help you out as soon as we can…
Regards,
JonahJanuary 4, 2012 at 8:37 am #12838nakturnalParticipantHi there, I have a backup site that I have updated with a newer WP and it still does not seem to work properly. Any advice would be great, I’ll keep trying with the plugins. Thanks!
January 4, 2012 at 9:03 am #12841JonahParticipantHi Leigh, can you please email WP admin and FTP access to jonahcoyote [at] gmail [dot] com so I can take a look? Do I have permission to change settings, turn off plugins, etc?
Thanks,
JonahJanuary 4, 2012 at 11:31 am #12847nakturnalParticipantSent an email over, let me know if you have any luck. I tried deactivating a few plugins (I don’t believe any other plugins involve using a date) but to no avail. You think it may have something to do with the loop itself?
Thanks!
January 4, 2012 at 12:09 pm #12849nakturnalParticipantAlso, I can open up a new topic but I had another question. I’m trying to get the events page to display 10 events and keep the homepage on 5 events, do I need to rewrite the loop a bit on the list.php file? Do you have an easy solution for that? I am going to look into it this evening. Thanks again!!
January 4, 2012 at 4:10 pm #12855JonahParticipantHi naktural, I emailed Shane requesting FTP access which I’ll need to figure out the previous days events showing but to modify what is displaying on just the events page you can use something like this in functions.php:
function my_get_posts( $query ) {
if(!tribe_is_day()) {
$query->set( 'posts_per_page', 5 );
}
return $query;
}
add_filter( 'pre_get_posts', 'my_get_posts' );
This tests to see if we are not viewing only one day (i.e. the events list) and then add to the query how many posts per page to display. Does that work?
January 4, 2012 at 5:22 pm #12860nakturnalParticipantThank you for the quick response! I sent an email with all the info you need for the previous problem.
The code you posted is 90% on point – the widget was also effected and this function overwrites the widget’s option. I’ll see if I can figure it out, though. Thank you!
January 6, 2012 at 9:13 am #12940RobMemberExcellent to hear, Nakturnal. If you can’t figure it out after giving this a go, let us know and we can take another stab on our end.
January 6, 2012 at 9:15 pm #12980nakturnalParticipantHello again! I actually may need a little assistance. I was looking for a way to add onto the If Statement ( for instance, being not a widget or only for a certain post type with WP’s API) and still struck out. I believe my lack in PHP skills are to blame.
From what I can see, the widget and the list.php are both looking for tribe_is_day so they are both rewritten to make 10 posts with Jonah’s script. Unfortunately for me I need 5 in the widget area and 10 or more in the list area. Any help with figuring out a way to separate them properly would be fantastic.
Maybe this could be a cool feature request for the future? By that I mean having a new loop for the events calendar and being able to choose how many events are listed from the plugin’s admin panel. To me it would seem beneficial to have an option, but then again I work with clients that are usually out of the box.
Thanks a million for the help so far! I know you are a small team and your assistance is incredible! Cheers to that.
~Shane
January 9, 2012 at 4:11 pm #13049RobMemberThanks for the words, Shane – definitely appreciated. I can see what you’re saying regarding having a new loop of some kind for the events themselves. I would suggest throwing this into the Feature Request thread (https://theeventscalendar.com/support/forums/topic/events-calendar-pro-feature-requests/) so that it’s a contender when we meet internally to discuss the next round of includes post-2.1.
To give you something in the short term, let me have one of our more advanced devs take a look and see what they can offer up. You should have an answer here shortly.
January 11, 2012 at 11:35 am #13202nakturnalParticipantHi there, still having issues with the Yesterday’s event showing problem I described above (more important of the two issues). Also, haven’t been able to figure out how to separate the posts loop from the widgets loop, either. I’m striking out lol. Any assistance would be greatly appreciated! Thanks!
January 11, 2012 at 6:46 pm #13234RobMemberSure thing! I can get one of our devs to comment on that too. Should have you a response tomorrow or Friday at the latest.
January 16, 2012 at 4:51 pm #13462RobMemberHey Nakturnal. I got one of our devs to take a look at this, and he was sort of stumped as to what could be happening. He did ask that I pass along this follow-up question, though: can you confirm if the yesterday’s events postings are EXACTLY 24 hours off, or if not by how many hours specifically? That will help us hopefully diagnose what’s up and provide you with a response.
-
AuthorPosts
- The topic ‘List View showing yesterday's events first?’ is closed to new replies.