When I type an ellipsis composed of three separate dots ...
, WordPress displays the pre-composed triple-dot glyph â¦
instead.
Is there any way to prevent WordPress from substitution the three dots?
When I type an ellipsis composed of three separate dots ...
, WordPress displays the pre-composed triple-dot glyph â¦
instead.
Is there any way to prevent WordPress from substitution the three dots?
You must be logged in to post a comment.
Three dots are converted to the typographically correct ellipsis ⦠in
wptexturize()
. You can disable it in many cases, see my plugin Disable Wptexturize.That conversion – among others – is caused by the
wptexturize()
filter being applied tothe_content()
.The sledge-hammer approach to preventing
wp_texturize()
being applied tothe_content()
is simply to remove the filter, like so:Another option is to use the plugin wp-Typography, which can override WordPress’s native character replacements. If you disable the changes you don’t want in the plugin, they won’t show up in the front-end anymore.
Instead of removing the entire
wptexturize
filter, I think a better approach to this issue is to letwptexturize()
run and then undo the replaced ellipsis glyph with the three dots.The filter is run at a priority of 11 so that it runs after
wptexturize()
.Note that this only replaces it in
the_content
filter, if you want it replaced inthe_excerpt
,the_title
, etc., then you’ll need to add those filters as well.Several possibilities, based on the use of a shortcode called ‘…’ (Yes, that’s a legal shortcode name.)
no_texturize_shortcodes
filter.<code>
tag (which is by default exempted from texturizing, so no filter is needed).<span>
, and use CSS to have it rendered in a font with an ellipsis character whose look you prefer (would need the filter this way).