Created
January 25, 2013 18:36
-
-
Save lswilson/4636773 to your computer and use it in GitHub Desktop.
Returns 10 older posts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function filter_where($where = '') { | |
$where .= " AND post_date < '" . date('Y-m-d') . "'"; | |
return $where; | |
} | |
// Register the filtering function | |
add_filter('posts_where', 'filter_where'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment