1

i'm hoping i'd find some help in regards to inserting ads into wordpress default rss feeds (i do not use feedburner)

<?php
function insertAds($content) {
    $content = $content.'<hr /><a href="http://www.wprecipes.com">Have you visited WpRecipes today?</a><hr />';
    return $content;
}
add_filter('the_excerpt_rss', 'insertAds');
add_filter('the_content_rss', 'insertAds');
?>

Source here

But i read that the_excerpt_rss and the_content_rss is kind of deprecated. Can anyone advise me on the present hooks to use?

Thanks

2

Take a look at the_content_feed as a replacement for the_content_rss.

1

Those filters aren’t deprecated. They are used in wp-includes/default-filters.php too.

But you should prefix your function name.

  • This should probably be a comment – xLRDxREVENGEx May 24 '11 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.