I have recently noticed that smart quotes (aka “curly quotes”) stopped working on my blog (they were replaced by the ordinary "straight quotes"). Typography is very important to me, so I tried to fix the problem. It proved harder than I had thought (although the solution turned out to be very simple).
First I thought there would be something wrong with the settings, but there doesn’t even seem to be an option to turn the smart quotes off. So I tried my custom theme using a fresh WordPress installation to make sure the problem was caused by the theme, not by a plugin or a corrupted WordPress installation.
It turned out that smart quotes worked like a charm if I used another theme and stopped working when I used my own. I gradually reduced the content of both my theme files and the theme files of some default WordPress theme to basically a single command:
while ( have_posts() ) : the_post(); echo get_the_content(); endwhile;
in my custom theme and
while ( have_posts() ) : the_post(); the_content(); endwhile;
in the default theme. And this was the culprit. I thought that “echo get_the_content()” was synonymous to “the_content()”, but the difference is that get_the_content() returns the original text before applying any filters (including wptexturize which takes care of smart quotes).
If you have to use get_the_content(), you can apply the filters manually:
while ( have_posts() ) : the_post(); echo apply_filters('the_content', get_the_content()); endwhile;