Publish The Feed Later

Some of you know this problem already, you publish a post and while you are publishing you notice an error. That's very annoying, the error is in your feed an published to the whole world.

That happened quite often to me, my fellow readers a writing comments so fast, right after publishing, to tell me about some errors I made, it's unbelievable. So I thought I should create a workaround to have the feed published a little bit later, even 5 minutes can be helpful. Here we go:
WordPress works with a special query, which acts differently depending on the user rights. It is always saved in the variable $where and differently assembled. That means, you can extend it.

If you look at the possibilities of mySQL, there is a function timestampdiff(). I extend the query of WordPress with this function. Note to query the feed before (is_feed()), if not it will be also happening for the classical publishing of posts in your blog.

65 comments

the reason why you might want to publish later is pretty simple. When you publish your feed, people will get your post with all errors immediately. It takes time before the feed updates, if you update your post, it will show the changes immediately, but your feed will stay the same until the next update, an update period can take hours, which is annoying, if all your readers can read the errors in your feed, even if you had correct it some hours ago. Hope that makes it clear.

OK, I think this mechanism is very close to something I'm looking for. The problem is that I don't know PHP.
What I would like to see is the following:
An algorithm, that, given a specific category, would delay the publishing of a post.
So, for instance: if the category is "Sports", the delay would be one day. If the category is "Hot News", the delay would be zero.
Is there anyone around here who could write up something for me? Thanks in advance.
I'll send you something from the Netherlands...

I found that when I pasted this into the functions.php file it would cause my RSS feed to no long work. If you went to the URL of the feed there would be a page not found error and feedburner could no longer use the feed.

I found that once this was code was deleted from the functions.php file everything worked again. I liked the concept of this but if using it is going to cause my feed to be unavailable I will deal with publishing the RSS at the same time.

The code works fine and i think you have only a problem in your theme or a problem with other plugins. The function wait 10 minutes and the is the same content in the feed. Feedburner scan the code in different interval with and publish later. Maybe is this a problem with this function.

I tried it with the default WordPress theme and it was still causing the same problem. I turned off all of my plug ins and there was still the same problem. It had nothing to do with Feedburner this code caused the feed from WordPress (url.com/feed) to no longer work.

Our website uses wordpress as a platform. We tested our RSS and there's a whole month delays. So the blog post i'll get on my outlook or google reader would be the post last month rather than the latest one. Where could the problem lie?

Is it the same principle as this? I mean delaying 5 minutes. Could it be possible that rather than delaying 5 minutes, ours is delayed in 30 days?

Thanks for this guide. But if i want that google index content fast i ping rss feed. One real scenarion:
- aggregator post in blog
- blog generate feed from posts
- i ping by cron job generated rss feed

Is simple - if feed is generated after 5 minutes, just content will be indexed after 5 minutes. In this way you must create 2 feeds - one public that is with 5 or better with 15 minutes delay and one private that you will use only to ping google to index .