How to Make Sure Your Feed is Updating on WordPress

This article will show you how to add a line code that will make your WordPress feed update every thirty minutes or less if you prefer: Feed the feed :-)

I decided I would use the WordPress feed widget to put a list of the latest blogs on the right hand side.  So I simply dragged and dropped the widget into the sidebar area, like we do with all the widgets and stuff located in the widget section.  This way, when anyone loaded any page the latest posts would be listed, genius! I thought and smiled at how easy it was and now people could easily see the latest blogs.

I added another blog and noticed the widget didn’t post the new feed.  I clicked the feed button and the feed page appeared with the new blog post, so I went back to the site and refreshed and still the WordPress widget wasn’t showing the new post. hmm :???:

I searched the web and found some links that said the widget updates every hour.  “Okay” I thought, I would wait.  So after an hour passed, I checked, and still no updates on the widget feed.  grr.. I decided I would search for a fix on the web and nothing really worked.  Then I read where the widget takes 12 hours to reload the feed :shock:   That was not happy, so I started searching for more ways to fix this and finally I discovered the answer:

In your wp-admin go to your Appearance then select Editor

Then find your functions.php and add the following code at the end:

// Make the feed update every 30 minutes Feed the feed
add_filter( 'wp_feed_cache_transient_lifetime', create_function('$a', 'return 1800;') );

The blue type of return 1800 means you can change that value to whatever you want.  It is in seconds.  So, if ya want it to check every minute, just change it to 60 instead of 1800, which is 30 minutes.

Now I placed this bit of code toward the end, right above:

/* End of file functions.php */
/* Location: ./functions.php */

Oh and my current version of WordPress is: 3.0.4

Hope this helps,

JD

To share this article with others, just click on your social media below:
  • Print
  • Twitter
  • Digg
  • del.icio.us
  • StumbleUpon
  • Facebook
  • Tumblr
  • LinkedIn
  • Sphinn
  • Mixx
  • Google Bookmarks
  • Blogplay

Subscribe Today

Enter Your Email to Keep Up-to-Date with the Latest Blog Posts

Delivered by FeedBurner

Donations

If you found this article or tips helpful and would like to say thank you in the form of a donation or perhaps buy me a cup of coffee or a beer, then please use the form below and Thank you so very much.

Please Select a Beverage Below

About JD

John Howard has owned 13 companies, had a Real Estate license, been an Mortgage Loan Officer, been extensively involved in Day Trading, Commodities, Bought and Sold Tax Property, Accomplished Tax Auditor, Accountant, Written numerous computer programs, Written Screen Plays & Short Films, been Director on two major production short films, and has been semi-retired since 2007, concentrating on personal investing and writing.