On my website there are a lot of authors and they are all writing about italian 'scene' so sometimes it happens that two of them write the same post or use same title so what I'm looking for is a way to prevent duplicated posts using title comparison. Something like here on stackexchange or that is Built in vBullettin and Data Life Engine. Is there any tutorial, example or even one of you who can help me achieve this?

  • Are posts being written through wp-admin, or through a custom interface?
    – mor7ifer
    Commented Jan 20, 2012 at 2:24
  • Posts will be written via wp-admin (WordPress default interface)
    – maisdesign
    Commented Jan 20, 2012 at 10:33

1 Answer 1


You can hook 'save_post' or 'wp_insert_post' (both executed the same in wp_insert_post()) to check for autosaves and notify the author(s) accordingly. The checks that I would do would be to check that the author of the autosave (aka, revision) and the new autosave are not the same, check that the post title is the same and that the content is SIMILAR, to do it right (enterprise strength) you'd need a decent algorithm, probably based on the counts of words or something like that, to do it quick you can just use strpos() and check if one contains the other. If you need example code, provide as many specifics on the implementation (in a comment) as you can and I'll write it up for you.

  • I try to explain as good as I can even if my english isn't perfect. Example: User 1 posts a new post named: Download FREE Inception ITA BdRip then a few hours late user 2 posts a new post named: Inception ITA Download FREE Then I would like to have a notice (before saving) that tells to the User2 that there is already a post with a similiar title and this notice will have a YES/NO button that asks if he is sure to save it. Even something like here on stackexchange will do the trick!
    – maisdesign
    Commented Jan 20, 2012 at 15:46
  • any new solution?
    – maisdesign
    Commented Jan 27, 2012 at 2:25
  • 2
    Sorry, I've been way to busy to write any serious code like this, these implementation notes should be more than sufficient to get you going though...apologies, but no code is coming.
    – mor7ifer
    Commented Jan 27, 2012 at 2:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.