Created
July 7, 2021 16:17
-
-
Save CapWebSolutions/95acafa3f6e409b99509d6d3ec7ba778 to your computer and use it in GitHub Desktop.
Change RSS feed on main WordPress feed from 12 hrs down to 1 hr. ref: https://wordpress.stackexchange.com/questions/6569/decrease-rss-cache-time-in-plugin Use this in event that external services are not picking up blog posts quickly enough in low traffic sites.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('wp_feed_cache_transient_lifetime', 'cws_shorten_rss_feed_timeout'); | |
function cws_shorten_rss_feed_timeout( $interval, $url ) { | |
if( 'https://<example.com>/feed' == $url ) | |
return 3600; | |
return $interval; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment