# Tell Feed Readers How Often to Check

> Sets the update period and time-to-live in your RSS feed, so feed readers check a daily blog once a day instead of every hour.

- Type: PHP
- Runs: Run everywhere
- Category: [RSS Feeds](https://wpide.com/library/category/rss/)
- Tags: rss, ttl, caching
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/feed-update-frequency/

## Code

```php
// How often you publish: hourly, daily, weekly, monthly or yearly.
$wpide_feed_period = 'daily';
// How many times per period.
$wpide_feed_frequency = 1;
// Minutes a reader may cache the feed.
$wpide_feed_ttl = 1440;

add_filter( 'rss_update_period', function () use ( $wpide_feed_period ) {
    return $wpide_feed_period;
} );

add_filter( 'rss_update_frequency', function () use ( $wpide_feed_frequency ) {
    return (string) absint( $wpide_feed_frequency );
} );

add_action( 'rss2_head', function () use ( $wpide_feed_ttl ) {
    echo '<ttl>' . absint( $wpide_feed_ttl ) . "</ttl>\n";
} );
```

## Notes

Readers treat these values as hints. Match them to how often you actually publish.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Tell Feed Readers How Often to Check" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
