Skip to content

Early-bird lifetime licence: $199 once, for the first 200 buyers only. See the offer

Publish to the RSS feed 15 minutes later

New posts appear in your RSS feed 15 minutes after publishing, so you have time to fix a typo before feed readers and email newsletters pick them up.

  • Type PHP
  • Runs Everywhere (runs as WordPress loads)
  • Category RSS feeds
  • Tested with WordPress 7.1
PHP
<?php

add_filter(
	'posts_where',
	static function ( $where, $query ) {
		if ( $query->is_main_query() && $query->is_feed() ) {
			global $wpdb;
			$where .= $wpdb->prepare( " AND {$wpdb->posts}.post_date_gmt <= %s", gmdate( 'Y-m-d H:i:s', time() - 15 * MINUTE_IN_SECONDS ) );
		}
		return $where;
	},
	10,
	2
);

In these packs

  • RSS feeds: Control what your RSS feed shows, and when.

Move your snippets over this afternoon.

Importing changes nothing until you switch over, and your old shortcodes keep working.