Wordpress

WordPress: Text being changed

Quotations and dashed are different from the original text to the display. This is problematic is you’re using code, because it will change it. 

This is called wptexturize. 

To solve this add the following code on the on the

#~/wp-includes/formatting.php

Code: It should be around line 90.

add_filter( ‘run_wptexturize’, ‘__return_false’ );

The final result should look something like this.

add_filter( ‘run_wptexturize’, ‘__return_false’ );
$run_texturize = apply_filters( ‘run_wptexturize’, $run_texturize );
if ( false === $run_texturize ) {

This should disable wptexturize GLOBALLY and should be update free; because there was another option to disable this on the Theme level, but I believe when you update the theme or wordpress, the change is reverted.

Leave a Reply

Your email address will not be published. Required fields are marked *