How to Disable Content Output in RSS Feed for WordPress?


RSS (Really Simple Syndication) is an old technique. It has of course the advantages: getting all information in once place, which is convenient. However, it is not so search-engine-user-friendly. Other users can retrieve RSS feed and re-populate automatically to their own websites. Search engines may even rank their ‘copied’ contents higher. This is discouraging for authors to produce original contents.

Also, you might not be able to see nice CSS in RSS Feed, such as this. In RSS Readers, users will not be engaged in the comments/discussions.

To disable content output in WordPress blogs, you need to edit the wordpress template functions.php, and add the following two empty filters:

1
2
3
4
5
6
7
8
9
10
11
// https://HelloACM.com
add_filter( 'the_content_feed', 'the_content_feed1' );
add_filter( 'the_excerpt_rss', 'the_excerpt_rss1');
 
function the_excerpt_rss1() {
    return "";
}
 
function the_content_feed1($content) {
    return "";
}
// https://HelloACM.com
add_filter( 'the_content_feed', 'the_content_feed1' );
add_filter( 'the_excerpt_rss', 'the_excerpt_rss1');

function the_excerpt_rss1() {
	return "";
}

function the_content_feed1($content) {
	return "";
}

Please note that you can only set two options in the WordPress settings – reading: full text or summary.

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
233 words
Last Post: How to Check If Object Is Empty in Javascript?
Next Post: Four Useful Cell Functions/Values in Excel

The Permanent URL is: How to Disable Content Output in RSS Feed for WordPress?

One Response

Leave a Reply