Below is the code to add custom content in WordPress RSS feed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Add custom content in WordPress RSS feed | |
function customprefix_add_custom_content_rss_feed($content) { | |
$content = $content.'<hr>Add custom content here!<hr>'; | |
return $content; | |
} | |
add_filter('the_excerpt_rss', 'customprefix_add_custom_content_rss_feed'); | |
add_filter('the_content_rss', 'customprefix_add_custom_content_rss_feed'); |