Home / RSS Feeds / WP Aggregator Feed Limit
Duplicate Snippet

Embed Snippet on Your Site

WP Aggregator Feed Limit

Increase the number of fetched items in RSS Feed

Colin Bunn PRO
<10
Code Preview
php
<?php
// Set custom number of posts for category feeds
function custom_category_feed_limit($query) {
    if ($query->is_feed() && $query->is_category()) {
        $query->set('posts_per_rss', 100);
	$query->set('nopaging', true);
    }
}
add_action('pre_get_posts', 'custom_category_feed_limit');

Comments

Add a Comment