This removes both the excerpt and the longer encoded content from the RSS feed.
<?php | |
/** | |
* Removes the content from the RSS feed and replaces it with a custom message. | |
* | |
* @param string $content | |
* | |
* @return string | |
*/ | |
function yst_clean_rss( $content ) { | |
if ( is_feed() ) | |
return 'This is a new post on yoast.com, Whoopity Doo!'; | |
return $content; | |
} | |
add_filter( 'the_content_feed', 'yst_clean_rss', 90, 1 ); | |
add_filter( 'the_excerpt_rss', 'yst_clean_rss', 90, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment