Real-Time Find and Replace for WordPress
Posted by Marios Alexandrou, Project Manager in Software Worth UsingThis 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 themes which means upgrades remain easy!
Here are some real-world examples:
1. Don't like the "Category:" text that the Dagon Design Sitemap plugin puts in front of every category? Remove it!
2. Annoyed by the link that Global Translator adds to every page? Remove it!
3. Have you noticed that the Sociable plugin doesn't correctly display the Twitter image? No problem, insert it!
And remember, all of the above can be done WITHOUT modifying themes or plugin files so you'll always be able to upgrade them without having to worry about losing custom edits.
Special thanks to Aaron Waggener for providing the technical brains behind this plugin!
Version History
1.0.0 Initial Release
1.0.1 Adjusted input box sizes so page better fits at lower resolutions
1.0.2 Corrected issue with missing files in distribution
Entries (RSS)
Marios - useful plugin, but i am struggling with Regex turned on. Catastrophic result as the page does not load.
I'm thinking it might be because I am running WP 3.0. Are you aware of any issues with it running on 3.0?
Thank you.
Does the page load as a blank page? I have this same issue quite often. Check your regex and see if you are not striping any DIV tag in the process. Look at your page“s source without applying the regex and then make some experiments. There are plenty of regex testers online that can help.
yes, all blank. any, even the simplest, regex logic i use produces that same result.
Do you use an $ before and after your regex? Here is an example of a regex I use:
$class="more-link"(.+?)(?=)$s
The comment system strips out some part of my code. The underscores do not really exist:
$class="more-link">(.+?)(?=)$s
Replace with a closing div tag.
Write me at gmail and maybe I can help. The comment system is not working with me
get my email from my first answer, ok?
Hi Kevin. There may be some issue with WP 3.0. I have yet to migrate so I haven't tested out the plugin yet.
I just installed this on a 2.9.2 website, and it doesn't seem to be working. I click on the "Add" button on the Real Time Search and Replace Tools page, but nothing happens. Shouldn't I get some kind of form to allow me to define rules?
Dan
I'm using this plugin on multiple 2.9.2 installs. Clicking the Add button creates a new row of input boxes.
Dan.. maybe you can see http://wordpress.org/support/topic/412442
Hi, I really like your plugin and I've installed your plugin in my several blogs and it works correctly. But while I tried to install in my latest blog, it won't work. I can't add any input text in the setting page.
---
Click "Add" below to begin.
[Add]
-----
when I clicked [Add] button, it won't display anything (the input form). ..
Probably you know the solution,..
thanks..
It looks like I missed including some files with the 1.1 release. I've corrected that omission with 1.2.
Hi!
I think there is a little bug in the plugin. Whenever I set a rule to search something that contains "#038;", it strips this string out from the "find" field as soon as I click the apply settings button. It happens when using both options, regex or not.
Is this expected behavior or it is a real bug?
What can I do to surpass this behavior and make it actually search for "#038;"? I've tried to escape all characters, but no joy either.
Thanks a lot!
Daniel,
I was able to save a rule with "#038;" in it. I didn't do anything special and it saved the first time. Are you able to enter other rules without problems?
Discovered that the problem is an "&" before the #308, making the problem string "Ĵ".
The first time the rule is entered it stays there. If I go to another page and then go back to the plugin's settings, the "Ĵ" is not there anymore. Anyway, the string is part of a URL, if that matters.
All other rules are always OK, only the ones using something like #+number are giving me this problem
Thanks!
Hi. I've noticed that the plugin filters my feed, too.
Is there any easy way to exclude the feed from being filtered?
Thanks a lot!
Sorry, there is no easy way i.e. no options you can set.
Ok, I didn't mean THIS easy
An "IF is_feed" well placed should do the trick, maybe?
I am starting to study wordpress, if you could point me to the right direction, maybe I could figure it out.
Thanks a lot!
I would like to make a donation. Can you modify the plugin not to rewrite the KEYWORDS meta?
Do you mean that if there's a match, but it's in the meta keywords, the replacement shouldn't happen? You can achieve this by using regular expressions although such regular expressions could get rather complicated.