Home

Public Domain Photos

Free for commercial redistribution and alteration (All photo from http://publicphoto.org/ is 100% free for use)

RSS Feed Refresh Frequency – WordPress Widget

feed logoIf 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 ... ]

9 Responses to “RSS Feed Refresh Frequency – WordPress Widget”

  1. Excellent – this works a treat! Solved a long running issue I have with my feeds.

  2. Ruskeybiz says:

    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.

  3. Andreas says:

    This is spectacular. Thanks for sharing this code. Works like a charm. Like Ruskeybiz said, there’s very little information on this out there.

  4. 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!

  5. admin says:

    Can it be placed at the end of the functions.php section, before “?>”

  6. 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

  7. nitin says:

    How can i use above code in simple PHP, without using wordpress or anything else.

  8. admin says:

    @nitin code is exclusively for WordPress.

  9. vito says:

    it works perfectly. Thanks.

Leave a Reply

 

Powered by WordPress ::