Family Encyclopedia >> Electronics

How to modify the refresh rate of the WordPress RSS widget

As amazing as the built-in WordPress RSS widget may be, there are times that it just doesn't update fast enough. Thanks to the fact that WordPress is so easy to customize, we can easily change it. In this article, we will show you how to modify the refresh rate of the WordPress RSS Widget.

All you have to do is add the following code to your theme's functions.php file or in a site-specific plugin:

 add_filter ('wp_feed_cache_transient_lifetime', create_function ('$ a', 'return 600;')); 

In this example, it is set to update every 600 seconds, or 10 minutes. Simply change this number to whatever you like and your RSS widget will update accordingly.

Source