0

Seeking a hook or code to override the Reading-Settings value for Syndication feeds show XXX items specifically for the comment feeds.

Ideally I'd want to roll into a plugin I can network activate on a multiuser site.

I am using Feed Wordpress to syndicate in comment feeds from about 100 student blogs on a multi-user site; I am seeing missed items because the comment feeds only provide 20 at a time (and we have a lot of comment activity). It would be nice to apply a plugin across their blogs to bump that comment feed item count to at least 40, while leaving the other feed settings at the default value.

1

There's a filter for that! The filter comment_feed_limit can be used to adjust the LIMIT clause directly. By default, the option from Settings -> Reading is used ("Syndication feeds show the most recent"), but that's used for other feeds as well. The comment_feed_limit filter is used exclusively for comment feeds.

add_filter( 'comment_feed_limits', 'wpse150187_comment_feed_limits' );

function wpse150187_comment_feed_limits( $limit ) {
    return 'LIMIT 40';
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.