Thursday 24 October 2013

How To Disable Smart/Curly Quotes In WordPress

Important: All scripts hosted on widcraft.googlecode.com don't work anymore because Google has blocked that SVN repository.
There are lot of word processor programs which itself converts all yours simple quotes to curly quotes (aka s mart quotes). It looks like small figures six and nine raised above the baseline (like 6...9 and 66...99).

It's a huge problem if you're writing codes in your posts as WordPress automatically converts all quote symbols to smart quotes. So if anyone is copying a snippet from your blog post would have problems with running to code in their own text file.

You can easily disable this feature with a small snippet. Just add following snippet to your functions.php file:

<?php
remove_filter('the_content', 'wptexturize');
remove_filter('comment_text', 'wptexturize');
remove_filter('the_excerpt', 'wptexturize');
?>

That's it!
Important: Check our new website TricksPanda.com for WordPress tutorials, plugins and more.
 
Powered by Blogger.