You are here: Home / Wordpress Plugins / WordPress Plugin: “Disable wptexturize”

WordPress Plugin: “Disable wptexturize”

September 25, 2007 by Jason · 56 Comments 

"Disable wptexturize" is the second plugin I've created for WordPress. To be honest, as far as plugins go, they don't get much simpler than this one. Aside from the header info, it consists of a grand total of three lines of code. Those three lines, though, make a world of difference to someone trying to run a site where formatting is important.

The purpose of this plugin is to stop the wptexturize filter from running on your content, the excerpt for your content (if you use it), and the comments left by your visitors. The texturizer mangles your code by converting what you actually type to what it thinks you mean. For example, the difference between "--" and "–" or straight quotes (what normal people use) and smart quotes (what Microsoft Word uses) is night and day when you're trying to run a command on a *nix system or compile a bit of code.

To be honest, I don't have any idea why disabling the texturizer isn't an option in the default code. I have to believe that there are tons of people who are annoyed by it, just as I was...

Regardless, here's the solution for you. Turn my plugin on, the texturizer goes away. Turn my plugin off, it comes back. Installation is simple, just unzip the file below into your plugins directory and then activate it from the plugins page in your blog's admin section.

Download the "Disable Texturizer" Wordpress Plugin

Filed under Wordpress Plugins · Tagged with disable wptexturize, wordpress plugin

Comments

56 Responses to “WordPress Plugin: “Disable wptexturize””
  1. spacer Jesse says:
    September 26, 2007 at 12:15 pm

    I think you have the wrong link posted spacer

  2. spacer Jason says:
    September 26, 2007 at 12:18 pm

    @Jesse,

    Whoops... Fixed. Thanks for the heads up.

  3. spacer Ben says:
    November 26, 2007 at 6:12 pm

    Thank you so much for writing this plugin. The WP Texturizer has always been my biggest headache with wordpress and your plugin has fixed it forever (I hope). Thanks for publishing this.

  4. spacer Jason says:
    November 26, 2007 at 7:56 pm

    @Ben,

    Glad you like it.

  5. spacer Todd Werth says:
    December 11, 2007 at 12:33 pm

    Thank you sir, you saved me from having to search through the code to disable it. Now I just need to figure out what is changing \n into n.

  6. spacer Klark says:
    February 19, 2008 at 4:13 pm

    does this work in the feed as well?

  7. spacer Jason says:
    February 22, 2008 at 4:37 pm

    @Klark,

    Yes, it does work on the feed.

  8. spacer Eule says:
    February 25, 2008 at 2:45 pm

    Is this plugin still up to date? Is it working with the newest version of wordpress?

  9. spacer Jason says:
    February 28, 2008 at 1:43 pm

    @Eule,

    It's only three lines so there's not really anything to keep up to date. As to the versions it works with, I'm using it here and I'm running 2.3.3 right now.

  10. spacer Rob Thunder says:
    May 1, 2008 at 1:35 pm

    Thank you.

    Thank you.

    Thank you.

    Thank you...

    THANK YOU!!!

    That damnable wptexturize filter has been the bane of my existence in the world of Wordpress for years. Finally I am rid of that.

    Having extensive PHP experience, it was getting so that I was willing to spend several days -if need be- to simply plow through every single line of code in all the Wordpress files to see if I could locate exactly what it was that was prettifying all my single and double quotes (as well as mangling my example codes) and eradicate it with extreme prejudice. You saved me that trouble, Jason. spacer ) I can now begin blogging the way I want to for the first time.

    I read elsewhere about those 3 lines of code but no one seemed to have a clear idea as to exactly where to use them. I read vague implications that it had something to do with myhacks.php (couldn't find this file in Wordpress 2.51) and vars.php in the wp-includes folder (of course, no one said exactly where to use those lines of code in vars.php).

    Well, well, just slap it in a plugin and that's it, that's all. Who'da thunk it? (obviously you did)..

    Thanks again, man.

    Oh and for others, it works fine in Wordpress 2.51 (latest version as of this writing)

  11. spacer Leo says:
    May 8, 2008 at 7:19 am

    FYI, there's a already plugin created for the same purpose.

    sparanoid.com/taxonomy/blog/wordpress/quotmarks-replacer/

  12. spacer Mire says:
    July 9, 2008 at 7:26 pm

    hey. Thx for the plug in. Works like a charm

  13. spacer andar909 says:
    August 11, 2008 at 12:13 am

    hi, andar here, i just read your post. i like very much. agree to you, sir.

  14. spacer Alan says:
    September 5, 2008 at 9:36 am

    Thanks Jason, I did discover that titles are still getting "wptexturized" so I added the following lines to "disable-wptexturize/disable-texturize.php":

    remove_filter('the_title', 'wptexturize');

    The wptexturize feature has been, in my opinion, the worst built-in feature in WordPress. How hard would it have been to put a simple option in the admin to turn it off.... Jeez. HTH.

  15. spacer Kathy K says:
    October 13, 2008 at 9:28 am

    Many thanks!

    And thanks to Alan, too - I also added the title.

  16. spacer Joel says:
    October 22, 2008 at 2:39 am

    Help! how do I turn texturize off for custom fields? My blog depends on having certain urls in the custom fields and wp always ruins them by converting characters like parentheses into character entities (why the idiots at the destination website are using those characters in their urls is another story).

  17. spacer Tom says:
    November 4, 2008 at 7:49 pm

    Very useful plugin... thanks!

  18. spacer Aalaap Ghag says:
    December 24, 2008 at 5:08 am

    Thank you!

  19. spacer Paul says:
    December 26, 2008 at 10:02 pm

    It does not seem to work with Wordpress 2.7. Is an update in the works?

    Thank you

  20. spacer malcolm coles says:
    January 13, 2009 at 6:08 pm

    Wasn't using your plugin, but have been hunting around for a solution to this problem after causing an unrecoverable error by editing the functions file from within wordpress!

    Anyway - the 2.7 comment. The code you used to need in your functions file appeared to be:
    ''
    Whereas you now need:
    'remove_filter('the_content', 'wptexturize');'
    (without start end quotes if they come through). Anyway, that might be the problem Paul ..

  21. spacer webmaestro says:
    January 13, 2009 at 6:22 pm

    What changes would be necessary to make it work only in RSS feeds?

    I like the elegance of this solution, but the only place I need to implement it is in the RSS feed.

    Thanks!

  22. spacer malcolm coles says:
    January 14, 2009 at 4:08 am

    PP removed. Sigh. Anyway the code you used to need, replacing the brackets with pointy ones was:
    (?php remove_filter('the_content', 'wptexturize');?)
    Now it should be as my previous post.

  23. spacer Stefan says:
    January 23, 2009 at 6:31 pm

    Hi Jason,
    Thank you for this plugin. I don't care how "simple" it is. It works wonders!

  24. spacer Henry Gomez says:
    February 20, 2009 at 11:27 am

    Genius. That texturizer thingy was screwing up our ellipsis.

  25. spacer hydraulic jacks says:
    March 14, 2009 at 8:31 am

    I have to say, that I could not agree with you in 100%, but that's just my opinion, which could be very wrong.
    p.s. You have an awesome template for your blog. Where did you find it?

  26. spacer malcolm coles says:
    March 14, 2009 at 8:54 am

    Oh dear, 'hydraulic jacks'. You've just left that identical post on my blog 3 hours ago. Bad luck for you that I'm subscribed to this post ...!

  27. spacer Romeo says:
    April 13, 2009 at 10:41 am

    Thank you very much for this plugin. Great

  28. spacer Heartburn Home Remedy says:
    April 15, 2009 at 8:50 am

    This topic is quite hot in the net at the moment. What do you pay attention to while choosing what to write ?

  29. spacer andy49 says:
    April 18, 2009 at 5:51 pm

    anodized assume beginning counteracting entirely feebler Giuliano Hudson mice plumbs probation rules saddest salted Thornburg tired ">c99 shell achieves bares capaciousness coroutine degenerates impassive imperialism subsume .

  30. spacer Bryan says:
    April 25, 2009 at 4:30 pm

    Is anyone using this successfully under 2.7.1? I thought it would remove curly quotes when I pasted them from other sources but maybe I misunderstood what it's supposed to do.

  31. spacer Major Slack says:
    April 25, 2009 at 8:11 pm

    "Is anyone using this successfully under 2.7.1? I thought it would remove curly quotes when I pasted them from other sources but maybe I misunderstood what it's supposed to do."

    I am. This plugin has been rock solid throughout numerous Wordpress upgrades.

  32. spacer Bryan says:
    April 25, 2009 at 8:15 pm

    If you cut & paste some text that has curly quotes in it, will the plugin convert them to normal quotes? That doesn't work for me.

  33. spacer Outsourcing Software Company says:
    May 27, 2009 at 9:38 pm

    "Disable wptexturize" plugin is very useful. It works well with wordpress 2.7 for me. Thank you Jason for sharing the plugin with us. Wish you all the best for your future work.

  34. spacer webmaestro says:
    May 28, 2009 at 10:58 am

    This plugin works great in WPMU 2.7.

    As I mention above, the only place I really need it is in the RSS feeds. What would it take to enable disable wptexturize to only do its magic in RSS feeds?

  35. spacer Web Hosting Philippines says:
    July 7, 2009 at 2:33 am

    Dude, making things a lot simpler is harder than making things complicated. I hope that make sense. That 3 lines of code is so easy to use and edit.

  36. spacer Barnevern says:
    August 7, 2009 at 6:44 pm

    Thanks for this very small an useful plugin to WP spacer

  37. spacer Dan W. says:
    September 22, 2009 at 6:58 pm

    I just installed it on wp 2.8.4 and it i

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.