How to Disable Smart / Curly Quotes on WordPress 2.5
Smart / curly quotes might look nice typographically, but they can be a major pain if you want to copy and paste source code onto your blog (as I do with Ruby Inside and Rails Inside). Luckily there’s an easy solution, though it took me a while to discover it.
Basically, go to the functions.php file within your current theme (usually wp-content/themes/[theme name]/functions.php) and add this to the end:
<?php remove_filter('the_content', 'wptexturize'); ?>
Now you’re good to go! If you want to be a bit more extreme and remove smart quoting from comments, add this:
<?php remove_filter('comment_text', 'wptexturize'); ?>
3 Comments