• Hi guys!

    I am using rss to fetch topics from my invision board forum, but while it will list the topics it won’t update when new topics are posted until after over 12 hours or more.

    I tried turning off my WP Super Cache plugin and click “clear cache”, but this didn’t help. I do however suspect that this is in fact related to caching somehow…

    When I switched theme, just for a test, the rss list was updated on the new theme.

    Any ideas how I could solve this?

    Kind regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • Under the hood the RSS widget uses fetch_feed(). From the codex:

    fetch_feed caches results for 12 hours by default. You can modify this by modifying the time interval via the filter wp_feed_cache_transient_lifetime.

    So you will need to add this code to adjust the expiration:

    function danniee001_feed_lifetime( $interval, $url ) {
    	if ( 'https://mysite.org/feed' == $url ) {
    		$interval = 3600;
    	}
    
    	return $interval;
    }
    add_filter( 'wp_feed_cache_transient_lifetime', 'danniee001_feed_lifetime', 10, 2 );
    

    Add it to a child theme’s functions.php file, or a simple plugin.

    That example changes the expiration for https://mysite.org/feed to 3600 seconds, or 1 hour. Change the URL to the URL to your feed and 3600 to the expiration time you want. But don’t go too low or you could negatively affect your site’s performance.

    Thread Starter danniee001

    (@danniee001)

    Hi Jacob!

    I did exactly what you suggested and created my very first child theme! So today I learned two things, how to create a child theme and how to change the time interval for rss!

    Thank you so much

    Kind regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘RSS not updating, no matter which plugin I try’ is closed to new replies.