Working in WordPress here. As you may know, all of the typical solutions for displaying upcoming events in WordPress are awful, so I'm accomplishing it with simple custom fields. Each event the user will enter they will enter a Numeric date "YYYYMMDD".
What I need to find out is how to code in PHP for the script to first get php:the_date <'YYYYMMDD'> and then have WordPress filter events dynamically, only displaying posts that have a value greater than or equal to the numeric value printed (which would be the YYYYMMDD format of "today" which is pulled in via PHP:the_date.
Here is the wp_query I'm using:
<?php
$recentPosts = new WP_Query();
$recentPosts->query('showposts=5&meta_key=event_date&orderby=meta_value&category_name=events&order=ASC');
if ($recentPosts->have_posts()) : while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?>