Title: My first (string-replacing) plugin
Last modified: August 19, 2016

---

# My first (string-replacing) plugin

 *  [palee](https://wordpress.org/support/users/palee/)
 * (@palee)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/my-first-string-replacing-plugin/)
 * Hello,
 * I have “written” my first plugin, but however simple is that, it doesn’t work
   flawlessly.
 * It is supposed to replace all ‘a’ letters to ‘xxx’ in the content.
 * But it only replaces them in 2 posts out of 4.
 *     ```
       function automatic_link ($text) {
   
       $text = str_replace('a', 'xxx', $text);
       	return $text;
       }
   
       add_filter('the_content', 'automatic_link');
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [palee](https://wordpress.org/support/users/palee/)
 * (@palee)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/my-first-string-replacing-plugin/#post-1208481)
 * I’m sorry I haven’t asked your help specifically, so…
 * Can you think of any reason that applies this string replacing filter differently
   to posts?

Viewing 1 replies (of 1 total)

The topic ‘My first (string-replacing) plugin’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [palee](https://wordpress.org/support/users/palee/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/my-first-string-replacing-plugin/#post-1208481)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
