-
-
Save jpmarchand/b2397724b4a4b465e359 to your computer and use it in GitHub Desktop.
Insert custom content in WordPress RSS feed. Source: http://www.wprecipes.com/how-to-insert-ads-on-your-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'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment