Title: using echo when filtering the_content
Last modified: August 19, 2016

---

# using echo when filtering the_content

 *  [nttaylor](https://wordpress.org/support/users/nttaylor/)
 * (@nttaylor)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/using-echo-when-filtering-the_content/)
 * Is it a sin, or at least bad practice, to use “echo” in a function that has been
   added as a filter on “the_content” ?
 *     ```
       function myFunc($content) {
         echo "This gets printed first";
         return $content;
       }
       add_filter ('the_content', 'myFunc');
       ```
   
 * Or is the only accepted way to modify the incoming content string:
 *     ```
       function myFunc($content) {
         $content = "This gets printed first".$content;
         return content;
       }
       add_filter ('the_content', 'myFunc');
       ```
   
 * ?

The topic ‘using echo when filtering the_content’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [nttaylor](https://wordpress.org/support/users/nttaylor/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/using-echo-when-filtering-the_content/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
