This plugin allows you to dynamically (i.e. at the time when a page is generated) replace code and text from themes and other plugins with code and text of your choosing before a page is delivered to a user's browser. Because the find and replace happens in real-time no changes are needed to plugins or [...]

Real-Time Find and Replace for WordPress


43 Responses to “Real-Time Find and Replace for WordPress”
  1. Comment by Daniel:

    Hi. When using the plugin without marking "Regex", it works just fine. If I mark the "regex" box, I get a blank page on my blog (even with very simple regex expressions, like find my name and replace with another name, and even if I left all fields blank).
    So, marking the option "regex" just gives me a blank page (no code at all).
    Is there some special way to use it with regex? I am using wordpress 2.8.3.
    Thanks a lot!

    • Comment by Daniel:

      It seems that it is needed to enclosure the regex between . Is it a problem with my installation or this is the way it meant to be? Is it included in some plugin documentation? I couldn't find it anywhere.
      If I use a regex very simple like or , it works fine.

      I am trying to rip off all images from posts syndicated with the FeedWordpress plugin, using the following regex:
      ]*>(.*?)
      As I have to enclosure it between , it becomes:
      <]*>(.*?)>

      But it does not work. All I get is the blank site again. What am I doing wrong? I am sure the regex is right, because I took it from the regex website, so I think I am missing something, maybe escape some of the >s, but it does not work with \> either.
      Help, please?

      • Comment by Daniel:

        My examples get truncated... Anyway, if I use a regex like [Dd]aniel it works fine. If I try to use > greater and < lesser, it goes bad.

        • Comment by Marios Alexandrou:

          Sorry that you're having problems with the plugin. I don't have any really complex regular expressions in use at the moment, but I do have one that might help. This one replaces the WordPress generator meta tag. Note that the regex starts and ends with a forward slash. And the forward slash that's part of the HTML has to be escaped with a backslash.

          /<meta name="generator" content="WordPress [0-9]\.[0-9]\.[0-9]" \/>/

          • Comment by Daniel:

            Exactly what I was needing. Also, the site http://www.regular-expressions.info/php.html has valuable infos regarding the use of regex with PHP.
            Thanks a lot!

          • Comment by Daniel:

            Any chance to get this filter to work on the post itself, filtering content in the database itself, instead of just on the reader screen? I think it would be great :)

          • Comment by Marios Alexandrou:

            There are other plugins that make permanent changes to post and page content.

  2. Comment by Jennifer Johnson:

    i downloaded it and it really works and i have found it as the best replacement tool for word press.....

  3. Comment by travis:

    This plugin breaks my wordpress 2.8.3 install any ideas?

  4. Comment by Audiofeeline:

    I would like to replace some HTML code in my posts but it seems it dosen't work. I use WP-Super Cache, is it compatible ?
    Thanks! ;)

    • Comment by Marios Alexandrou:

      Super Cache creates an HTML copy of the page that is delivered to the user. Once the HTML copy is created, plugins aren't executed so you won't be able to do a find and replace with my plugin. However, assuming Super Cache executes all plugins before it caches the page, then the find and replace functionality should work just fine. Note that I haven't tested this yet.

  5. Comment by Garret:

    Okay, I see the need and I need it. {Problem is it doesn't work on ANY of my sites!! Help please. Hitting add simply does nothing but add a # to the end of the url. Help would be appreciated. Tested on Linux and Mac, Firefox on both and Safari on Mac.

    Garret

    • Comment by Marios Alexandrou:

      Any chance that you didn't unzip the sub-folder included in the archive? The JavaScript files that house the add a box functionality are within the JS folder.

      • Comment by Garret:

        LOL, that's it, look at your zip file, it's missing the js folder

        • Comment by Marios Alexandrou:

          Oops. I'm not sure how that happened. WordPress.org actually creates the zip file so I guess I somehow failed to submit the js sub-folder. I just uploaded a new version 1.0.2 and it looks like all files are included this time around.

          Sorry about that!

          • Comment by Garret:

            Heh, np. Quick question. Trying to replace text with hml but the html wraps once updated and it wacks everything out. I would imagine that I have to escape something to stop this. Any help there?

            As an example replacing the word, video, with videos

            Thanks
            Garret

          • Comment by Garret:

            Any help with my below comment?

          • Comment by Marios Alexandrou:

            I'm trying a similar replace and it's working fine for me. I've actually set up a rule to change the "Any help with" part of your comment to a link. Did you type in the find / replace rules or paste them from somewhere? Maybe a funky character (tab or something) got in there.

          • Comment by Garret:

            Right, works find with a url that fits within the form field, try a very long url, something longer that the form field.

          • Comment by Marios Alexandrou:

            I dropped in a long URL. Still works fine for me. Check out the "any help with" text to see the URL I used.

  6. Comment by baron:

    Works great, thank you

  7.  
Leave a Reply