If you’re a developer who often publishes code snippets on your website, you might have encountered the following annoying problem: someone points out that the code you posted doesn’t work. Why does that happen? It's quite simple: WordPress by default replaces normal quotes with "smart quotes" and that is what breaks your code snippets.
In order to get rid of these curly quotes do the following:
- Open your theme's functions.php file. (* if it doesn’t exist, create one)
- Paste the following code:
<?php remove_filter('the_content', 'wptexturize'); ?> - Save the file, and forget about broken code snippets!
Explanation: the wptexturize() function automatically turns normal quotes into smart quotes. Using the remove_filter() function, we tell WordPress not to apply this function to our posts' content. Filter functions are very powerful as they allow you to override some WordPress features without modifying the WP core.
Source: www.wprecipes.com/how-to-get-rid-of-curly-quotes-in-your-wordpress-blog
Tags: Curly Quotes problem, WordPress Functions
I very much enjoy your own posting type, very attractive,
don’t quit as well as keep penning because it simply very well worth to read it.
excited to looked over even more of your content, have a pleasant day