There are times when you publish a post and suddenly find an error. You can go back in the admin panel and change it, but it is already published in the feeds. With this hack, you can put a delay of as many minutes as you like, so you can double check the post live.
Open your functions.php and add this code:
01 | function publish_later_on_feed( $where ) { |
06 | $now = gmdate ( 'Y-m-d H:i:s' ); |
15 | $where .= " AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, '$now') > $wait " ; |
20 | add_filter( 'posts_where' , 'publish_later_on_feed' ); |
This code is adding a 10 minute delay on your post being shown on the RSS Feeds, you can change it by changing the number 10 to as many minutes as you like.