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.
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.
You must be logged in to post a comment.
In your
functions.php
:And the same for
the_excerpt
orthe_title
(if required).I found a solution: If you are using WordPress, in the beginning of your file
single.php
add these lines:And do your test. I am 99.99% sure that will work because I had the same problem and I fixed it using that lines 10 seconds ago. 😉
Another solution that override the origin function of
wptexturize
and update all related filters.I had the same problem as the OP and the solution proposed by @TheDeadMedic almost worked for me.
But my WP version has several function_something.php files and I had to add this to them all (making sure to add them after the php opening code <?php):
Of course only one of them would be needed if you only want to remove the filter for titles, content or excerpt.