How to disable WordPress from automatically changing “x” to multiplication symbol “×” when typing numbers that also contain an “x” between them?

I simply want to be able type, for instance, “7×12 house design”. WordPress, however, automatically changes x (alphabet) to × (<- this is a multiplication symbol special character): “7×12 house design”.

How can I disable this?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

This is part of wptexturize, which includes a number of other transforms such as generating en- and em-dash symbols, ellipses and curly quotes. (Here’s the specific code for this, known as ‘multiplication symbol’ in the documentation but ‘times’ in the code.)

You can disable wptexturize completely with

add_filter( 'run_wptexturize', '__return_false' );

but there’s no built-in way to disable just this one wptexturize rule.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x