Help with WordPress

This is a request for help from my readers. I’m trying to find out how to hack WP so that it will never insert <br> tags in my entries. I want it to ignore hard newlines, treating them as soft.

22 comments

  1. Duh…?
    My WP does never insert ( are changed to it) automaticly.
    It’s a surprise to me. So I’d wrote a simple test in my WP 1.5.2 here.

  2. It’s probably done using nl2br(), a php function that converts newlines to HTML line breaks. Grepping for that and removing the calls should do it.

  3. The Markdown plugin treats single newlines as all part of the same paragraph and doesn’t insert <br> tags for every newline. I’d recommend using that, although I don’t know if it’ll snip out the existing <br> tags you already have.

  4. IIRC, to disable it you have to: Search for a file called functions-formatting.php. Then search the line where wpautop is defined. It should say function wpautop($pee, $br = 1). Change it function wpautop($pee, $br = 0). You should be done.
    Be aware it will modify your past posts too.
    First time coming so I hope this works. :)

  5. Your comment is being held for review. High in the glass-and-steel tower that is Making Light Headquarters your post is being examined under criteria both Mysterious and Arcane. Soon, if it passes High Level Review by our Gnomes, it will be released.

    The most common reasons that a post is held are that it was made to a Really Old Thread or it contained a Whole Lot of URLs.

Leave a Reply to Mike Cancel reply

Your email address will not be published. Required fields are marked *