wp_query help needed - wasted hours already (2 posts)

  1. navigadget
    Posted 10 years ago #

    I should've asked earlier before wasting so much time...
    OK, I'm trying to get 10 posts from the events category INCLUDING THE ONES WITH FUTURE DATE. For some reason the below only shows stuff from the past.

    $yf_query = new WP_Query('category_name=events&showposts=10');

    I'm ok w/ dirty hacks such as year=2005||year=2006||year=2007 so I'm good for three years but I don't know the right syntax for this as well.

    Please help.

  2. navigadget
    Posted 10 years ago #

    I found my solution myself. Add this line before the code I pasted above.

    I'm good until 2010 :)
    In case you are wondering I tried doing year > 2005. No good.

Topic Closed

This topic has been closed to new replies.

About this Topic