The number of items within a feed can be changed in the admin area under:
Settings > Reading > Syndication feeds show the most recent
Changing the settings above will affect all feeds. If you want to change the number of posts only for a particular post type, you can add the following code to your functions.php
file, changing post_type_name
to your post type’s name (Source for this trick).
function wpse240469_feed_posts( $query ){
if ( $query->is_main_query() &&
$query->is_feed() &&
'post_type_name' === $query->query_vars['post_type']
) {
add_filter( 'option_posts_per_rss', 'wpse240469_feed_number_posts' );
}
}
add_action( 'pre_get_posts', 'wpse240469_feed_posts' );
function wpse240469_feed_number_posts(){
return -1; // -1 for all posts, change to whatever value you want
}