Articles from a given time range
-
Hi, WordPress 1.5 newbie here. I’ve looked through documentation, but I didn’t find the info I desired.
I can see how one can use WP_Query to get articles on a given day, month, that sort of thing, but I am not certain how to get an irregular time block, like the last 9 days, or the next 4 days.
I looked at the source of a theme where the author achieved this by shooting a query through $wpdb->get_results($sql). However, the results from that were pretty much mysql rows which had to be altered to fit into the template.
I would prefer a solution where one ends up with a $wp_query sort of object which would function just like one created through query_posts(‘whatever’) so that I can use the same sort of templating I use elsewhere on WordPress. Is the possible?
Thanks for reading!
Sam
- The topic ‘Articles from a given time range’ is closed to new replies.