The WordPress feature that “beautifies” (malforms!) your Blog text is called `wptexturize`: on WordPress.com you cannot disable it.
Posted by jpluimers on 2025/02/03
Over the years, WordPress started to beautify more and more text thereby malforming many (read thousands) of my older blog posts.
An example is this:
--jeroen
is now rendered as
–jeroen
The two hypen-minus signs or -- have become a en-dash or –, not even an em-dash or — that is is double the width of an en-dash.
So after figuring out the cause, I asked if one could change it for a WordPress.com blog backed by a premium account: [Wayback/Archive] Jeroen Wiert Pluimers on Twitter: “Hi @wordpressdotcom, how do I globally disable wptexturize for a paid wiert.wordpress.com blog (it has Premium subscription)? Over the years, it has malformed more and more of my text which I don’t want (as it is way too much work to re-visit thousands of blog posts).”
Unbelievably, the answer is no!
So WordPress.com mandatorily changes the display of all your old Premium blog posts and the only solution they offer is to upgrade for another USD ~17 per month to disable it.
I was flabbergasted so I published an excerpt of the email they sent me:
- [Wayback/Archive] Jeroen Wiert Pluimers on Twitter: “@wordpressdotcom It is unbelievable that you need a business plan for this, as per email response: << Thank you for reaching out. It is not possible to globally disable
wptexturizeon the Premium plan. It may be possible to disable this using a third-party plugin:wordpress.com/plugins/zachspearspremium.wordpress.com?s=disable+wptexturize.” - [Wayback/Archive] Jeroen Wiert Pluimers on Twitter: “@wordpressdotcom Third-party plugins do require the WordPress Business plan. Please let us know if you have any additional questions. >>
WordPress.comhas enforced a “feature” for which one has to pay USD 17/month extra (above Premium plan) to be able to turn it off. What a world!”
A query for the plugins you might want to use [Wayback/Archive] Plugins: s=disable+wptexturize — WordPress.com (this link is blog-URL neutral unlike the link in the Tweets above that Automattic mailed me).
This is how I figured out what caused the malforms:
- [Wayback/Archive] wordpress en dash with double dash – Google Search
- [Wayback/Archive] Need to create double-hyphen — | WordPress.org
- [Wayback/Archive] formatting – How to prevent automatic conversion of dashes to – – WordPress Development Stack Exchange (thanks [Wayback/Archive] radman, [Wayback/Archive] TheDeadMedic and [Wayback/Archive] Manuel)
When I put — into a post it is automatically converted to the ––character in the output by wordpress.How can I get normal'--'double dashes in my content.…
In yourfunctions.php:remove_filter( 'the_content', 'wptexturize' );And the same forthe_excerptorthe_title(if required).…
in the beginning of your filesingle.phpadd these lines:<?php remove_filter( 'the_title', 'wptexturize' ); remove_filter( 'the_content', 'wptexturize' ); remove_filter( 'the_excerpt', 'wptexturize' ); ?> - [Wayback/Archive] Topic: How to stop automate changing double dashes into single dash | WordPress.com Forums
This sneaky text conversion performed behind the scenes by the WordPress engine is a “feature” offered by the wptexturize filter.
- [Wayback/Archive] [Solved] The double dash WP ‘feature’. | pwrusr.com
tl;dr.
Go to: Dashboard -> Appearance -> Editor -> “functions.php” and paste “add_filter( 'run_wptexturize', '__return_false' );“ - [Wayback/Archive]
wptexturize()| Function | WordPress Developer Resources
Here are some of the text transformations:
source text transformed text symbol name “—“ “—” em-dash ” — “ “—” em-dash “–“ “–” en-dash ” – “ “–” en-dash “…” “…” ellipsis “ “ opening quote “hello “hello opening quote ‘hello ‘hello opening quote ” ” closing quote world.” world.” closing quote world.’ world.’ closing quote ” ™” ” ™” trademark symbol 1234″ 1234″ double prime symbol 1234′ 1234′ prime symbol ’99 ’99 apostrophe before abbreviated year Webster’s Webster’s apostrophe in a word 1234×1234 1234×1234 multiplication symbol - [Wayback/Archive] wordpress-develop/formatting.php at 6.0 · WordPress/wordpress-develop
/**
* Replaces common plain text characters with formatted entities.
*
* Returns given text with transformations of quotes into smart quotes, apostrophes,
* dashes, ellipses, the trademark symbol, and the multiplication symbol.
*
* As an example,
*
* 'cause today's effort makes it worth tomorrow's "holiday" ...
*
* Becomes:
*
* ’cause today’s effort makes it worth tomorrow’s “holiday” …
*
* Code within certain HTML blocks are skipped.
*
* Do not use this function before the {@see 'init'} action hook; everything will break.
*
* @since 0.71
*
* @global array $wp_cockneyreplace Array of formatted entities for certain common phrases.
* @global array $shortcode_tags
*
* @param string $text The text to be formatted.
* @param bool $reset Set to true for unit testing. Translated patterns will reset.
* @return string The string replaced with HTML entities.
*/
function wptexturize( $text, $reset = false ) {...} - [Wayback/Archive] wptexturize feature introduced – Google Search (I could not find when this method was introuced)
--jeroen
Rate this:
Share this:
- Click to share on Mastodon (Opens in new window) Mastodon
- Click to share on Bluesky (Opens in new window) Bluesky
- Share on Tumblr
- Click to share on Reddit (Opens in new window) Reddit
- Click to share on Threads (Opens in new window) Threads
- Tweet
- Click to share on Telegram (Opens in new window) Telegram
- Click to share on Nextdoor (Opens in new window) Nextdoor
- Click to share on WhatsApp (Opens in new window) WhatsApp
- Click to print (Opens in new window) Print
- Click to email a link to a friend (Opens in new window) Email
Related
This entry was posted on 2025/02/03 at 12:00 and is filed under Development, PHP, Power User, Scripting, SocialMedia, Software Development, Web Development, WordPress, WordPress. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
This site uses Akismet to reduce spam. Learn how your comment data is processed.






Leave a comment