Deluxe Blog Tips About Projects

How to disable curly quotes in WordPress

By default, WordPress automatically converts single and double quotes into a more beautiful, curly style. Depending on the language, the curly quotes might be different. Not only quotes, but other characters like apostrophe, en dash, em dash are also converted. In most cases, this is not a problem. In fact, it can help your content looks more beautifully. But in some rare cases, it causes some problem when copy and pasting code.

Quotes and other characters are converted by WordPress in the function wptexturize() To disable this function completely, use the following snippet. You can add it into your themes’ functions.php file or in a functionality plugin, or use the Code Snippets plugin to add it.

add_filter( 'run_wptexturize', '__return_false' );

After adding this snippet, all your text will be display as it is. No automatic change. Easy to copy and paste!

Subscribe to the Newsletter

Subscribe to get my latest content by email. I won't send you spam. Unsubscribe at any time.