Title: Problem with adding filter
Last modified: August 18, 2016

---

# Problem with adding filter

 *  Resolved [MattGeri](https://wordpress.org/support/users/mattgeri/)
 * (@mattgeri)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/problem-with-adding-filter/)
 * 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)

 *  Thread Starter [MattGeri](https://wordpress.org/support/users/mattgeri/)
 * (@mattgeri)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/problem-with-adding-filter/#post-659450)
 * Oops. Silly old me! I had whitespace after the closing php tag. Problem fixed!
   Thanks!!

Viewing 1 replies (of 1 total)

The topic ‘Problem with adding filter’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [MattGeri](https://wordpress.org/support/users/mattgeri/)
 * Last activity: [18 years, 5 months ago](https://wordpress.org/support/topic/problem-with-adding-filter/#post-659450)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
