show only upcoming posts

Home Forums Calendar Products Events Calendar PRO show only upcoming posts

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #49615
    steven
    Participant

    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’); ?>:

    #49624
    Barry
    Member

    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.

    #49627
    steven
    Participant
    #49631
    Barry
    Member

    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?

    #49638
    steven
    Participant

    Yes thanks that’s exactly the issue – I need to review with my client but if we wanted to show events who’s start date was in the future, could we

    #49641
    Barry
    Member

    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.

    #49697
    steven
    Participant

    Gives me a place to start if that’s how they want to go— thanks for the help

    #49702
    Barry
    Member

    No problem – I’ll go ahead and close this thread, but of course feel free to create new ones as needed 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘show only upcoming posts’ is closed to new replies.