You are currently browsing the page Disable WP fancy quotes and other in the Wordpress category.

Disable WP fancy quotes and other

"Wptexturize" was something I found very annoying because it transforms " into and -- into etc. This is annoying when posting code snippets :/

If you want to disable this on all your pages like me, just add this snippet in your header:

<? remove_filter ('the_content', 'wptexturize');
remove_filter ('comment_text', 'wptexturize');
remove_filter ('single_post_title', 'wptexturize');
remove_filter ('the_title', 'wptexturize');
remove_filter ('the_excerpt', 'wptexturize'); ?>

Of course, if you want to keep fancy quotes in your title, remove the corresponding line. That is to say:

remove_filter ('single_post_title', 'wptexturize');

Hope it helps!

Print This Post Print This Post



Related Posts

  • None Found

Sponsors


3 Responses to “Disable WP fancy quotes and other”

I know, I find this annoying when I was trying to copy a code snippet from a website.


that is helpful. thanks for sharing :)


From the bottom of my heart, THANK YOU.


Leave a Comment

Works? Doesn't work? Other tips? Please leave a comment! :)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

To post codes, please go to SimpleCode and transform your codes first, so that it will displayed properly. Indeed, < and > need to be converted to &lt; and &gt; :)


Close
E-mail It