If your RSS widget doesn’t update, or doesn’t update frequently enough, add the next wordpress code to your current theme’s function.php:
add_filter( 'wp_feed_cache_transient_lifetime', create_function('$fixrss', 'return 1800;') );
Now the feeds links will be checked every 1800 seconds / a half-hour !
I tried the code for today news and going extremely well!
[ Short URL ... ]




Excellent – this works a treat! Solved a long running issue I have with my feeds.
I’m making a custom news page with 10 different RSS feeds and they weren’t updating but this code worked. For me, i had to enclose the code above with the usual php enclosures . Thanks a bunch for the code though, there is very little documentation on the simplepie functions in wordpress.
This is spectacular. Thanks for sharing this code. Works like a charm. Like Ruskeybiz said, there’s very little information on this out there.
How do I enclose the code in the “usual php enclosures”?
Does it have to go in the sidebar section?, Or can it be placed at the end of the functions.php section?
Thanks in advance!
Can it be placed at the end of the functions.php section, before “?>”
Thank you.
Very smart. It worked.
Yes it Can be placed at the end of the functions.php section, before “?>”
Keep up the good work
Regards
How can i use above code in simple PHP, without using wordpress or anything else.
@nitin code is exclusively for WordPress.
it works perfectly. Thanks.