Username: Save?
Password:
Home Forum Links Search Login Register*
    News: Keep The TechnoWorldInc.com Community Clean: Read Guidelines Here.
Recent Updates
[April 12, 2025, 01:54:20 PM]

[April 12, 2025, 01:54:20 PM]

[April 12, 2025, 01:54:20 PM]

[April 12, 2025, 01:54:20 PM]

[March 12, 2025, 03:05:30 PM]

[March 12, 2025, 03:05:30 PM]

[March 12, 2025, 03:05:30 PM]

[March 12, 2025, 03:05:30 PM]

[January 03, 2025, 03:29:12 PM]

[January 03, 2025, 03:29:12 PM]

[January 03, 2025, 03:29:12 PM]

[January 03, 2025, 03:29:12 PM]

[November 08, 2024, 04:31:03 PM]
Subscriptions
Get Latest Tech Updates For Free!
Resources
   Travelikers
   Funistan
   PrettyGalz
   Techlap
   FreeThemes
   Videsta
   Glamistan
   BachatMela
   GlamGalz
   Techzug
   Vidsage
   Funzug
   WorldHostInc
   Funfani
   FilmyMama
   Uploaded.Tech
   Netens
   Funotic
   FreeJobsInc
   FilesPark
Participate in the fastest growing Technical Encyclopedia! This website is 100% Free. Please register or login using the login box above if you have already registered. You will need to be logged in to reply, make new topics and to access all the areas. Registration is free! Click Here To Register.
+ Techno World Inc - The Best Technical Encyclopedia Online! » Forum » THE TECHNO CLUB [ TECHNOWORLDINC.COM ] » Programming Zone » PHP
 Make Wordpress Stop Replacing Double Dash with Em-dash
Pages: [1]   Go Down
  Print  
Author Topic: Make Wordpress Stop Replacing Double Dash with Em-dash  (Read 20698 times)
Khushi
Global Moderator
Adv. Member
*****



Karma: 4
Offline Offline

Posts: 329

Hello!!


View Profile
Make Wordpress Stop Replacing Double Dash with Em-dash
« Posted: January 03, 2007, 12:40:59 AM »


Wordpress by default replaces the double dash (--) with an em-dash character. If you are showing code or programming examples this will cause your visitors unnecessary confusion. This recipe shows the simple way to turn that behavior off.

This problem is occurring because Wordpress automatically runs a bunch of filters on your content before displaying it out to the browser. These filters include the smiley face replacement and others to try and clean up the content and make it more presentable to users. We will leave the rest of the filters alone.

Start by using either your ftp, ssh, or other client to open up the SITE_ROOT/wp-includes/functions-formatting.php file in a text editor and find these two lines:

Code:
$curl = str_replace(? -- ?, ? ? ?, $curl); 
$curl = str_replace(?--?, ???, $curl);

You can comment out these lines by putting the php // comment characters before them both, or you could simply delete the lines. When you are done, it should look like this:

Code:
//$curl = str_replace(? -- ?, ? ? ?, $curl); 
//$curl = str_replace(?--?, ???, $curl);

Now you will be able to see the double dash character in your blog posts, and no more comments from upset visitors saying that your examples aren't working. =)

Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Copyright © 2006-2023 TechnoWorldInc.com. All Rights Reserved. Privacy Policy | Disclaimer
Page created in 0.17 seconds with 24 queries.