• Resolved MattGeri

    (@mattgeri)


    Hey Guys and Gals.

    I just wrote a little piece of code that adds nofollow tags to my WP posts. Here is the code:


    <?php
    function addnofollow($text) {
    return str_replace('<a href=', '<a rel="nofollow" href=', $text);
    }
    add_filter('the_content', 'addnofollow');
    ?>

    Now it all works very well except when I try to view my RSS feed. I get the following error:

    Warning: Cannot modify header information – headers already sent by (output started at /home/cfml/public_html/wp-content/plugins/addnofollow.php:12) in /home/cfml/public_html/wp-includes/feed-rss2.php on line 2

    Any ideas what is causing this?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Problem with adding filter’ is closed to new replies.