วันพุธที่ 3 พฤศจิกายน พ.ศ. 2553
What is a Niche Blog?
Note: This is designed for WordPress 2.9. The general idea will work for previous versions of WordPress, the exact line number might be different.
There might be a time when you want to post an entry with double hyphens. However, WordPress wants to show items containing more than one hyphen in a row as a solid line. This is not the desired affect you are after. Thank goodness there is a way to disable this from happening blog wide.
Perhaps you want to display the tag as I did in the post on using it to only show a selected excerpt on your blogs main page. To allow for this types of situations to take place, we will look at the file where the replacement takes place.
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 part of the lines above contain the items that are to be converted. We are interested in the first three items. Remove them and the result will be:
$static_characters = array_merge(array('xn-', '...', '"', ''s', ''", ' ™'), $cockney);
$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.
Source article: how to create a free blog and Business Blogger and Blogging Hosting and Writing Journals and Writing Journal
blog
ป้ายกำกับ:
blog promote,
free blog
ไม่มีความคิดเห็น:
แสดงความคิดเห็น