I'm trying to create a custom RSS feed that shows posts from the custom post type 'events' for the next 7 days ahead only.
The feed is already sorted by event start date order rather than published date through the plugin, I just can't figure out how (as a beginner in PHP!) how to limit the feed to only the 7 days ahead. This is the query I have so far, which works fine until I try to filter the feed against a date and then it returns no posts :-(
Any pointers much appreciated!
date = date("d-m-Y"); $date = strtotime($date); $date = strtotime("+7 day", $date); $args = array( 'post_type' => 'event', 'showposts' => 10, 'meta_key' => 'st_date', 'meta_type' => 'date', 'value' => $date, 'compare' => '<' ); query_posts($args);