Smart quote fix

This is a test of my smart-quote fix.

There’s an apostrophe in this sentence.

“This sentence is surrounded by double quotes.”

‘This sentence is surrounded by single quotes.’

Here’s how I fixed it:

Create a file in wp-content/plugins called my-hacks.php. Put the following in the file:

Plugin Name: my-hacks
Plugin URI: #
Description: Resting place for a variety of changes. Presently includes removing
the wptexturize filter from comment_text, the_excerpt and the_content
Version: 0.1
Author URI:
remove_filter('comment_text', 'wptexturize');
remove_filter('the_excerpt', 'wptexturize');
remove_filter('the_content', 'wptexturize');

Now, log in to WordPress and choose Plugins. Activate my-hacks. That’s it!




  1. no1son

    no problem. :)

  2. Pingback: SuperDeluxo4.2 wgets and cURLs

  3. OmegaMan

    Its great that Matt showed you how to do it, but why did Matt not make it a simple check box, turn off smart quotes on the admin page? That would allow one to specify the character set…why not these items? Thanks for this blog post. My blog is 90% code snippets and that smart quote for the user is damaging on copy and paste….

  4. OmegaMan

    It appears that the latest version of WordPress no longer uses filters you mentioned and smart quotes are still outputted…check your own text. :-(

  5. Katja (Post author)

    Yeah – the smart quote hack was something I did several years (and revs of WP) ago.

  6. Monty

    Thanks for posting this; WordPress doesn’t have many of these small annoyances, and I’m glad so many people are willing to help fix them.


Leave a Comment

Your email address will not be published. Required fields are marked *