Inserting Thing to Your RSS Feed

You can use the following snippet to insert a link back to your site, some advertising, social media options etc. Basically anything you like, add the following to your theme’s functions.php file :

function insertAds($content) {
$content = $content.'<hr /><a href="">Have you visited InfoAceh today?</a><hr />';
return $content;
add_filter('the_excerpt_rss', 'insertAds');
add_filter('the_content_rss', 'insertAds');

In this example, the custom html inserted is “<hr /><a href=””>Have you visited InfoAceh today?</a><hr />”

Simply change that to anything you like.


You may also like...