Title: simple string replace? (first plugin)
Last modified: August 20, 2016

---

# simple string replace? (first plugin)

 *  [KillerSneak](https://wordpress.org/support/users/killersneak/)
 * (@killersneak)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/simple-string-replace-first-plugin/)
 * So i’m trying to fix some minor problems with a clean 3.3 install and the TwentyEleven
   template (1.3)
 * the first error i want to fix is the
 * `<a href="http://wordpress.org/" title="Semantic Personal Publishing Platform"
   rel="generator">Proudly powered by WordPress</a>`
 * and change rel=”generator” to rel=”author” with the code below but it’s not working(
   note this is my first attempt at a plugin)
 *     ```
       <?php
       function replace_content_rel_generator($content) {
       $content = str_replace("rel='generator'", "rel='author'", $content);
       return $content; }
       add_filter('wp_footer','replace_content_rel_generator');
       ?>
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/simple-string-replace-first-plugin/#post-2448825)
 * You have double quotes in your string “generator” and use single quotes in your
   str_replace ‘generator’
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/simple-string-replace-first-plugin/#post-2449007)
 * `wp_footer` is not a filter, it’s an action, it does not pass you any content
   to do string replacement on.
 *  [kitchin](https://wordpress.org/support/users/kitchin/)
 * (@kitchin)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/simple-string-replace-first-plugin/#post-2449053)
 * That text is added by the theme. Generally themes override plugins. You could
   make it happen, using [http://php.net/ob_start/](http://php.net/ob_start/) but
   there may be a better way. Or just mod the theme, footer.php.
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/simple-string-replace-first-plugin/#post-2449068)
 * Better yet..
    1. Create a [child theme](http://codex.wordpress.org/Child_Themes).
    2. Copy the footer.php from the TwentyEleven theme into your child theme’s directory.
    3. Open the file, remove what you don’t want.
    4. Save the changes.
    5. Job done.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘simple string replace? (first plugin)’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 4 replies
 * 4 participants
 * Last reply from: [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/simple-string-replace-first-plugin/#post-2449068)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
