Support » Plugins » Hacks » Automaticly replace text in new posts, is it possible?

  • Hello,

    Some of my sites are using other sites that generate code which has text in them that we don’t like, like alt=”” tags etc. I would like to know if there’s someway to use javascript to check each post before they are posted and if “target string” is found it replaces that text with whatever we set it to.

    I found a plugin called “Search % Replace” and it worked great, however this would mean we have to manually run this a lot, and as the database grows the load on checking all posts will be larger, so a script that did this once each post would be better.

    Anyone have any ideas, or want a job for some money?

Viewing 1 replies (of 1 total)
  • How do you get the content from the other sites? I do something similar with the FeedWordpress plugin.

    For the replacing, it will depend on if you want to alter the content permanently on the DB or just when showing it.

    If you are ok with just changing on showing the page, the Real Time Search and Replace plugin can help. If not, you will need to set up a hook to run every time a new post is published, altering the post in the DB.

Viewing 1 replies (of 1 total)
  • The topic ‘Automaticly replace text in new posts, is it possible?’ is closed to new replies.