12/29/2003 ↓

Remove extra line breaks in WordPress

If you like this post, please subscribe to our RSS feed to read our new posts every day.

This is for me to remember, but can be useful to others as well. It took me almost a half hour to hunt down and I dont want to have to hunt it down again!
Find this line in your b2functions.php (inside your b2-include folder):
function wpautop($pee, $br=1) {

Replace it with:
function wpautop($pee, $br=0) {

And no more extra line breaks!

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Friends

Translate

Translate to German Translate to Spanish Translate to French Translate to Italian Translate to Portuguese Translate to Japanese Translate to Korean Translate to Russian Translate to Chinese

Latest Videos

3 Comments | Leave a comment | Comments RSS

  1. Line Breaks
    Wrestling with legacy linebreaks from Blogger and MovableType in WordPress 1.2.

    Speak Stiltedly and Wear a Yellow Shirt — 06/4/2004 @ 12:28 pm
  2. This function makes it impossible to display multiple images next to each other in a post, as it inserts line breaks in between each one. This fixed the problem, I’m really glad you found it, I was looking for it for a while and couldn’t find it.

    It took me a while to find your post also, I was looking for something to do with line breaks and img tags, I didn’t realize that this one massive function handles all of this stuff.

    The only difference now is that it’s now in functions-formatting.php inside the wp-includes (in wp mingus).

    [Reply]

    paul (1 comments.) — 08/28/2004 @ 5:35 pm
  3. This post is definitely most useful. I was having an issue where kept showing up in my posts when I was doing a (using plugin exec_php) and this completely solved the problem.

    [Reply]

    Jack Po (1 comments.) — 04/5/2006 @ 5:00 pm

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

(required)

(required, will not be published)


S2