Straight vs curly quotes in WordPress — and when wptexturize is not enough

Keyboards type straight quotes: " and '. Typography uses curly ones: “ ” and ‘ ’ in English, « » in French, Ukrainian and Russian. WordPress quietly converts many of them when it displays a post — which is why straight quotes in the content often go unnoticed until they show up somewhere else.

What WordPress converts

The wptexturize() function runs on post content, titles, excerpts and comments when they are displayed. Among other things it turns:

  • "quoted" into “quoted” and 'single' into ‘single’;
  • apostrophes in it's into it’s;
  • primes in 5'10" into 5′10″;
  • ... into an ellipsis … and (tm) into ™.

The quote characters come from WordPress translations, so a site in another language may display that language's quotes. Text in pre, code, kbd, style, script and tt elements is left as typed, and themes or plugins can turn the conversion off with the run_wptexturize filter.

Where straight quotes still show

The conversion happens on output; the database keeps the typewriter characters. Everything that reads the content differently shows them as typed:

  • the block editor and the REST API (headless front ends, apps);
  • SEO titles and descriptions, social previews and newsletters built from the raw text, depending on the tool;
  • content exported or synced to other systems;
  • sites where wptexturize is disabled.

And the automatic guess is not always right: a quote after a bracket, a dash or an HTML tag can come out as the wrong curly direction, and a straight quote on a Ukrainian or Russian page becomes an English-style “ ” unless the site language says otherwise.

Which quotes for which language

LanguageQuotes
English (US)“double”, ‘single’ inside
English (UK)‘single’ is common, “double” inside — either is fine if consistent
French« guillemets » with non-breaking spaces inside
Ukrainian, Russian«ялинки» / «ёлочки», „лапки“ inside

Fixing quotes in the text

A search-replace cannot fix quotes reliably: it does not know which quote opens and which closes, and it would also change HTML attributes, shortcodes and code. Fixing them needs to work on visible text only.

Content Polisher Pro includes an Advanced typography rule that suggests, for each post's language:

  • "text" → “text” in English, «text» in Ukrainian and Russian, « text » with non-breaking spaces in French;
  • ... → … (an ellipsis character);
  • missing non-breaking spaces inside French guillemets.

Attributes, links, shortcodes and code are never touched. Because quotes can be ambiguous, these are suggestions to review, not automatic fixes — each with a Before / After preview and undo.