Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: RSS not updating, no matter which plugin I try

Discussion in 'Misc WordPress Requests' started by Jacob Peattie, Mar 28, 2018.

  1. Jacob Peattie

    Guest

    Reply To: RSS not updating, no matter which plugin I try, by Jacob Peattie

    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 ( 'http://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 http://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.

    Reply To: RSS not updating, no matter which plugin I try
     
    #1

Share This Page

Monarch Social Sharing Plugin