Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress: disable wptexturize globally

Tags:

wordpress

I have a Wordpress page with the title "Paper 10x10". In my sidebar navigation this page is displayed as "Paper 10×10" (note that the x is texturized by Wordpress and therefor the x became a multiplication sign ×).

I have the plugin raw html plugin installed. It only disables wptexturizing for the_content. But the navigation is not in the_content but in get_sidebar().

I tried remove_filter:

remove_filter('the_content', 'wptexturize');
remove_filter('the_excerpt', 'wptexturize');

But this also only disables texturizing for the content or the excerpt.

How can I disable the wptexturize filter globally in my Wordpress blog?

like image 402
Max Avatar asked Nov 29 '22 18:11

Max


2 Answers

You can disable it globally with the run_wptexturize filter, as detailed here:

add_filter( 'run_wptexturize', '__return_false' );

like image 60
Nick Avatar answered Dec 17 '22 13:12

Nick


Try:

remove_filter('the_title', 'wptexturize');
like image 32
windyjonas Avatar answered Dec 17 '22 11:12

windyjonas