Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
25 Million+
Websites using our plugins
Years of WordPress experience
WordPress tutorials
by experts

How to Delay Posts From Appearing in WordPress RSS Feed

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Do you want to delay posts from appearing in your site’s RSS feed?

Delaying posts from appearing immediately can save you from sending out unfinished work accidentally, give you time to edit typos you might see, and help you beat content scrapers in SEO.

In this article, we will show you how to delay posts from appearing in WordPress RSS feed.

How to Delay Posts From Appearing in WordPress RSS Feed

Why Delay Your RSS Feed in WordPress?

Sometimes you may publish something on your WordPress blog with a typo that you just didn’t see. The mistake is then distributed to your RSS feed and all of your subscribers. If you have email subscriptions on your WordPress blog, then those subscribers will get it as well.

By adding a delay between your RSS feed and your live site, you get a little window of time to catch an error on a live site and fix it.

RSS feeds are also used by content scraping websites. They use it to monitor your content and copy your posts as soon as they appear live. If you have a new website with little authority, then a lot of times these content scrapers may end up beating you in the search results.

By delaying an article in your feed, you can give search engines enough time to crawl and index your content first.

Having said that, let’s see how to easily delay posts from appearing in WordPress website‘s RSS feed.

How to Delay Posts in Your WordPress RSS Feed

To begin, we recommend using WPCode to delay posts from appearing in your site’s feed. WPCode lets you add custom code to WordPress safely and easily without having to worry about your site breaking.

For advanced users, you can copy/paste the following code into your theme’s functions.php file instead. You’ll need to modify the code to change the time interval.

Note: Remember that editing your core WordPress files can be dangerous, which is why we recommend WPCode. You’ll also lose any custom code snippets when you update your theme.

For details, see our article on how to paste code snippets from the web into WordPress.

function wpb_snippet_publish_later_on_feed( $where ) {

	global $wpdb;

	if ( is_feed() ) {
		// Timestamp in WP-format.
		$now = gmdate( 'Y-m-d H:i:s' );

		// Number of unit to wait
		$wait = '10'; // integer.

		// Choose time unit.

		// Add SQL-sytax to default $where. By default 10 minutes.
		$where .= " AND TIMESTAMPDIFF($unit, $wpdb->posts.post_date_gmt, '$now') > $wait ";

	return $where;

add_filter( 'posts_where', 'wpb_snippet_publish_later_on_feed' );

Now we’ll show you how to do this the easy way with WPCode.

First, you will need to install and activate the free WPCode plugin. For details, you can follow our step-by-step guide on how to install a WordPress Plugin.

Upon activation, you can navigate to Code Snippets » Add Snippet. After that, simply search for ‘rss’ or scroll down to the ‘RSS Feeds’ category.

Then, just hover your mouse over ‘Delay Posts in RSS Feeds’ in the results and simply click on ‘Use snippet.’

Add a snippet using WPCode

Next, you will be taken to the ‘Edit Snippet’ screen, where WPCode has pre-configured the snippet settings for you.

By default, your posts will be delayed from appearing in your RSS feed by 10 minutes from the time it’s published.

If that delay is good for you, then all you have to do is click on the switch to change it to ‘Active’ and press the ‘Update’ button.

Adjust the time your posts are delayed in RSS feed

If you want to alter the length of the delay, you can do so by changing the number on Line 10 and the unit of time on Line 13.

For example, you can delay the post by one hour if you replace $wait = '10'; and $unit = 'MINUTE' with $wait = '1' and $unit = 'HOUR'.

If you need to adjust the delay again, simply repeat those steps, and if you want the posts to go back to hitting the feed immediately, simply toggle the switch back to ‘Inactive’ and press ‘Update.’

Don’t Forget to Check Out the WPCode Snippet Library

WPCode also comes with a huge collection of other code snippets, too. You can see what’s there in Code Snippets » Library in your admin dashboard.

WPCode library of code snippets

You may be able to replace some single-use plugins on your site by simply activating snippets you find in the library.

For example, you can find snippets that will let you disable automatic updates, allow SVG uploads, set a minimum word count for posts, and much more.

We hope this article helped you learn how to easily delay posts from appearing in WordPress RSS feed. You may also want to see our guide on how to create an email newsletter the right way, or see our expert picks for the best live chat software for small business.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

10 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Kurt says

    I use the Code Snippets plugin. Should this function be ran: everywhere, only in the admin area, or only on the site front-end?

  3. CNXSoft says

    It looks like it may not work anymore. I have the following error with this code:

    unexpected variable “$wpdb”

    • WPBeginner Support says

      Hi Eric,

      The easiest way to do this is by publishing your posts at a particular time of the day. However, caching and user’s rss feed crawlers can still affect when your entry actually appears on user’s RSS feed readers or inbox.


  4. Melika says

    Thanks for the tutorial.
    The part that you mentioned content scrapers got me a little worried. So I wanted to ask if you use this method yourself to avoid problems with content scrapers and indexing …

    • Melika says

      Now i know what i asked was kind of funny :D
      Because i see that you have mentioned “website with little authority”
      Thanks again for the article

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.