Click here to register or to donate.Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

RSS Widget frequency post update

#1

Nov 21, 2012, 06:47 AM

capelady

48 posts · Mar 2010

I have a few RSS Widgets in the sidebar of https://www.capecodbirdclub.org/. I have noticed that the links to the posts are not updated as frequently as the RSS feed I have in my Firefox Bookmarks Toolbar. It's sometimes a few posts behind. Refreshing the browser doesn't help, closing Firefox and restarting doesn't help.

In searching for a reason/solution (since I know little about RSS feeds, and how they work), I did find one page (http://www.village-idiot.org/archive...ss-rss-widget/) that says to modify functions.php with:
add_filter( 'wp_feed_cache_transient_lifetime', create_function('$a', 'return 1800;') );
The page says "The above code will cause the feeds to be checked every 30 minutes."

Does this sound like a reasonable solution? If so, does it matter where in functions.php I put it?

If someone has a better solution, I'd love to hear it.

#2

Nov 21, 2012, 05:05 PM

lmilesw

10,174 posts · Jul 2009

Central New York State USA

You could try using the Code Snippets plugin that lets you add code to functions.php without editing the file itself.

__________________~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.

#3

Nov 21, 2012, 06:03 PM

capelady

48 posts · Mar 2010

Thanks, I didn't know about that plugin. I've put the code in there, and will wait to see if the feeds seem to be more current.