We have been using this little query to show upcoming posts on out site since we launched it last fall. However someone today noticed that it starts showing events dated march 30th- Ive looked at it a few times and it seems to correlate to your tutorial on the subject- Am I missing anything? Anyting else in wordpress that might cause this I haven’t thought of
‘upcoming’,’posts_per_page’=>4) );
foreach($get_posts as $post) {setup_postdata($post); ?>
<a href="” id=”post-“>
ID, true, ‘M j, Y’); ?>:
Hi Steven – can you use a service like Gist or Pastebin to share code (and drop the link in here)? The forum doesn’t currently handle code very nicely.
Is it possible the events showing up with an earlier-than-expected start date have not yet expired? In other words, that the end date is still in the future?
Just events that start in the future? Possibly yes. The easiest way would be to retrieve them with the rest then check the start date before echoing them to the screen.
That may not work too well if you require pagination, though, and in that case you’d probably need to dive into manipulating the query via the various filters exposed by WordPress.