Raise the number of comments retrieved in comment feeds from the default (10) to 100:
In PHP 5.2 or earlier:
/**
* Filter the LIMIT clause on comment feed queries.
*
* @param string $limit LIMIT clause for the comment feed query.
* @param WP_Query $instance WP_Query instance, passed by reference.
* @return string (maybe) Filtered comment feed query LIMIT clause.
function wpdocs_raise_comment_feed_limit( $limit, &$instance ) {
return 'LIMIT 100';
}
add_filter( 'comment_feed_limits', 'wpdocs_raise_comment_feed_limits', 10, 2 );
In PHP 5.3 or later:
// Filter the LIMIT clause on comment feed queries to increase the number from 10 to 100.
add_filter( 'comment_feed_limits', function( $a ) { return "LIMIT 100"; } );
You must log in before being able to contribute a note or feedback.
Raise the number of comments retrieved in comment feeds from the default (10) to 100:
In PHP 5.2 or earlier:
In PHP 5.3 or later: