Filter should pull zero posts, but pulls 1
-
Hi.
I’m filtering posts_where with the following function:
function filter_archive($where = '') { $where .= " AND post_date >= '" . date('Y-m-d', strtotime('-60 days')) . "'" . " AND post_date <= '" . date('Y-m-d', strtotime('-15 days')) . "'"; return $where; }
I then run: query_posts(“cat=-1”)
Expected behavior: Since the earliest dated post is May 14, 2009, have_posts() should return false and the loop should not run.
Actual behavior: have_posts() returns true and the loop runs and displays one post.
Does anyone know what might cause this? Let me know if you need more info or want to see more code.
Thanks!
Adam
- The topic ‘Filter should pull zero posts, but pulls 1’ is closed to new replies.