Posts and Pages - Delay posting to my RSS feeds for 60 minutes
<!-- Imagine this: you just published the latest post on your blog and the RSS feed is already sending it to your subscribers, when you see there's a typo in the headline. That's a bummer, if only you had some more time to check everything out better... With this piece of code you can! Specifically, you delay the posting to your RSS feeds so you'll have enough time to check for the last time. If you like the idea, open the functions.php file and add this: -->
function Delay_RSS_After_Publish($where) {
global $wpdb;
if (is_feed()) {
$now = gmdate('Y-m-d H:i:s');
$wait = '60';
$device = 'MINUTE';
$where.=" AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, '$now') > $wait ";
}
return $where;
}
add_filter('posts_where', 'Delay_RSS_After_Publish');
<!-- This is useful to check if there are typos, broken links etc. To change the delayed timeframe, just edit the $wait = '60'; with another value that better works for you. -->