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 thoughts on “Help with WordPress

  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. Are you a thrid party posting tool? Or simply straight through the web interface?

  3. 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.

  4. 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.

  5. 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. :)

  6. 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.

  7. As ‘domain’ said – use nl2br() in php. You could insert it at the engine-level or the template-level.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>