How to Stop WordPress from Converting Quotes to Fancy Quotes

This issue has plagued my own WordPress sites for years. I finally had enough of it and took the time to fix it. I was surprised at how simple and easy it was to fix. That means this is going to be a quick and easy tutorial! All you have to do if find your theme's functions.php file and append the following code to the end of it:

//remove smart quotes from posts:
remove_filter('the_content', 'wptexturize');
//remove smart quotes from comments:
remove_filter('comment_text', 'wptexturize');

...and that will stop quotes from being converted in both posts and comments on any WordPress website! Have fun posting code that your readers can easily copy and paste now! What is really cool is I went back and checked some of my former posts that I made before I implemented the above code and it changed all those quotes back to plain simple quotes too, so it is backwards compatible!

2 thoughts on “How to Stop WordPress from Converting Quotes to Fancy Quotes

  1. Thank you for sharing excellent informations. Your web site is very cool. I am impressed by the details that youve on this web site. It reveals how nicely you understand this subject. Bookmarked this website page, will come back for extra articles. You, my pal, ROCK! I found simply the info I already searched all over the place and just couldn't come across. What an ideal web site.

  2. I simply wanted to thank you so much again. I am not sure the things that I might have gone through without the type of hints revealed by you regarding that situation.

Leave a Reply

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