I have created a very simple website for a client where he can add and show upcoming auctions.
I have used the Custom Post Types UI plugin for the post types and the Advanced Custom Field to display the meta-fields.
Now, on the frontpage http://auktionsvinder.dk you can see three events. Now, the test event I have created, is "old". Or in other words, it has passed the date for the event, so; it should NOT be showing any longer.
How can make a custom WP Query that filters old post and only showing today's event and future event?
This is my current WP_Query, which doesn't seem to be working:
$args = array( 'post_type' => 'auktioner', 'meta_key' => 'dato', 'orderby' => 'meta_value_num', 'order' => 'ASC', 'meta_query' => array( array( 'key' => 'dato', 'compare' => '>=', 'value' => date('Y-m-d') )) ); $the_query = new WP_Query( $args );
Thanks a lot!