Posts Tagged ‘ WordPress Functions ’
Get rid of curly quotes in your WordPress blog
Monday, February 1st, 2010If 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
…