WordpressChina
Member
Posted 2 weeks ago #
How can I use code for a filter in functions.php to limit the characters/text size in my RSS feeds?
I am trying to use the following code to show 10 words but it is not working:
function myFilterShortenRSS($query) {
if ($query->the_content_rss) {
$query->set('','','10');
}
return $query;
}
add_filter('pre_get_posts','myFilterShortenRSS');
WordpressChina
Member
Posted 2 weeks ago #
Sorry, anybody know the code to correctly make only the first 10 words show in the RSS feed? Or some way to only show the text before the "more" cut-off?
WordpressChina
Member
Posted 1 week ago #
Any ideas how to cut the RSS feed down in size?
I am fairly certain about 2 years ago the RSS feed did stop at the < !-- more -- > tag.... but now the summary continues for many more words... I would like to be able to truncate this to whatever I need to shorten it to.