Exclude Posts Newer Than…
-
Is there a way to exclude posts newer than a a given date as in the published age of posts? I believe this is where it is being set in display-posts.php,
// How old should the posts be? if ( $args['how_old'] ) { $where .= $wpdb->prepare( " AND $wpdb->posts.post_date > '%s' ", gmdate( 'Y-m-d H:m:s', $current_time - ( $args['how_old'] * DAY_IN_SECONDS ) ) ); }
To which I’ve tried adding the line
$where .= $wpdb->prepare( " AND $wpdb->posts.post_date > '%s' ", gmdate( 'Y-m-d H:m:s', $current_time - ( 2 * DAY_IN_SECONDS ) ) );
unsuccessfully. Is there already a way that I have overlooked in the settings?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Exclude Posts Newer Than…’ is closed to new replies.