How to fix the refresh time on the WordPress RSS widget

I use the RSS widget to follow other site I run and my Zotero bibliographic database. A major problem, however, is that it is extremely slow to update: it appears that the default update is once every 12 hours.

There is no option for speeding up this refresh rate in the widget GUI. There is a solution for this, though it is ugly and apparently not cross-theme:

  • Open the functions.php file included in your theme in the editor (appearance > editor)
  • Add the following line somewhere in the file:
add_filter( 'wp_feed_cache_transient_lifetime', 
             create_function('$a', 'return 1800;') );

The key number is the 1800: this is time in seconds, and in this case 30 minutes. Change the size of this number and you increase or decrease the refresh rate.

My source for this is http://www.newtotheweb.net/2009/10/25/rss-widget-doesnt-update/. While the solution is found elsewhere, this also has an explanation.


Follow

Get every new post delivered to your Inbox

Join other followers: