There might be a time when you want to post an entry with double hyphens. However, WordPress will take anything with more than a single hyphen and combine them together as a single dash. This can be quite annoying, especially when you cannot see where this setting lives. You look in the dashboard and it's not there. You might not even be the most comfortable with snooping around in the 1000s of files included with WordPress. Have no fear, I have done the snooping and found where this is located and am providing a solution you can implement.
Keep in mind: This setting blog wide. There is no way I know of to change it per post or page.
The replacement of multiple hyphens into takes place in the following file:
wp-includes/formatting.php
Line 56 - $static_characters = array_merge(array('---', ' -- ', '--', ' - ', 'xn--', '...', '"', '\'s', '\'\", ' ™'), $cockney);
Line 57 - $static_replacements = array_merge(array('-', ' - ', '-', ' - ', 'xn--', '...', $opening_quote, ''s', $closing_quote, ' ™'), $cockneyreplace);
The first line are the items you might enter, such as 2 or 3 hyphens in a row. The second line is what the system is setup to replace your entry with. We are interested in the first three items for each of the two lines. Select the first three items and delete them. The result will be:
$static_characters = array_merge(array('-','xn-', '...', '"', '\'s', '\'\", ' ™'), $cockney);
$static_replacements = array_merge(array('-','xn--', '...', $opening_quote, ''s', $closing_quote, ' ™'), $cockneyreplace);
Save the file and re-upload it to your blog. Now when you enter more than one hyphen in a row in a blog post, they will be display correctly.
Published by Michael Mann
With over 12 years of professional experience as a Web designer and over 25 years of general computer experience, I am often the resident tech . I own and operate Michael Mann Desktop Publishing, a desktop p... View profile
- How to Backup Wordpress BlogInstructions on how to backup Wordpress MySQL database using phpMyAdmin and CPanel.
- Adding Article RSS Feeds to Your Wordpress BlogHow to promote published articles by adding RSS Feeds to your Wordpress blog.
- Best WordPress Web HostsThe best and top reliable and cheap web hosts and hosting providers for WordPress, with free auto-install, unlimited storage, bandwidth, transfer, domain names.
- How to Install Wordpress on Your Own Domain/ServerIf you're serious about starting your own blog and monetizing it, you should definitely install Wordpress on your own server; which is exactly what I will teach you to do in this article.
- Starting a WordPress BlogTutorial on how to start a basic Wordpress Blog and how to promote content such as Associated Content articles through a Wordpress Blog.
- How to Install and Use Nextgen Gallery Plugin in WordPress
- Upgrading WordPress Blogs
- Wordpress Plug-Ins You Should Be Using
- An Easy Way to Install a Wordpress Blog on PC, XP, Vista, Localhost
- Wordpress Themes You (Probably!) Haven't Seen Before
- Wordpress Adsense System for Blogging for Profits. A Review and Does it Work?
- How to Promote Your Writing Links Using WordPress



