Remove from RSS feed
-
I use this in my functions.php to hide the like count from my RSS feeds. Otherwise it comes up a number (almost always 0 – because 0 likes at the time of posting) that makes no sense in there without any context:
add_action( 'pre_get_posts', function( $query ) { if ( $query->is_main_query() && $query->is_feed && class_exists( 'Love_me' ) ) { remove_filter( 'the_content', array( Love_me::get_instance(), 'love_me_filter_the_content' ) ); } } );
Not all hosts allow you to edit files and it’s not worthwhile to have a child theme always. Would be nice if this is supported directly as a plugin default or a preference checkbox.
- The topic ‘Remove from RSS feed’ is closed to new replies.