• Resolved Nathan Reynolds

    (@nreynolds)


    This question revolves are the codex article, Displaying Posts Using a Custom Select Query.

    I’m using a category to display upcoming events by using <?php query_posts('showposts=10&post_status=future'); ?> on the specific categories template.

    So what I’m trying to do is have custom fields for the speakers for the events. I want to create a page for each speaker, with a list of the upcoming (and previous but that’s easy) events.

    However the query used in the codex uses wposts.post_status = 'publish' (which works great for past events) but if I use wposts.post_status = 'future' it displays the display else.

    What can I do?

Viewing 2 replies - 1 through 2 (of 2 total)
  • MichaelH

    (@michaelh)

    If you use query_posts (or get_posts or new WP_Query) then in your loop you will have access to the post ID and that’s what you’d need to retrieve the custom fields for that post/page.

    Related:
    Using_Custom_Fields

    Thread Starter Nathan Reynolds

    (@nreynolds)

    Wow, I’m stupid.

    No wonder it wouldn’t call future posts if I have wposts.post_date < NOW()

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Displaying Future Posts Using a Custom Select Query’ is closed to new replies.