WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Cannot force line breaks in post!

[Resolved] Cannot force line breaks in post!

  • I want to add line breaks here and there in my posts. I have tried everything. I thought I could just enter:
     
    and that would create an unbreakable line. It looks good in preview, but once saved, WP strips out all such breaks.

    Can anyone tell me how to add a line break in a post and have it stay there?

Viewing 15 replies - 1 through 15 (of 26 total)
  • Press enter?

    Alternatively, try adding <br /> where you want the line to break. If you need more space, try two of those. Or add a <p> tagset.

    Hitting the Enter twice it does add a <p> tag – as far as I know. And pressing it once = <br />

    I really don’t understand the OP question.

    This is a new install, right out of the box at Yahoo with their new Yahoo Business/Wordpress installation option.

    When I am creating a post, if I enter blank lines, enter
    tags, or if I enter  , regardless, when I save the post WordPress strips out all blank lines and publishes it without them. It completely removes them. I have tried everything and it simply won’t allow blank lines in my post. It’s driving me crazy.

    Never trust Yahoo.
    It had problems with WP before and I don’t think they are able to do it right now. (but this is just my personal opinion!)
    Get a cheaper host and install it manually – it will work.

    Unfortunately, I have all of my hosting set up at Yahoo already. I must say, it is awesome, great uptime, everything is tidy and easy to manage. I did use their new MT installation and found that I HATE MT, but now that they are the new WP host with quick install and everything, I had some confidence. Other than this issue of not being able to put line breaks in my posts, it works perfectly, and fast!

    Well, that’s not perfect… and I suggest you ask them about this thing since it works everywhere else, except your “perfect” Y.

    Fixed. In case anyone else has the same problem, here’s the deal:

    The Tiny MCE editor WP has incorporated (which I love) is defaulted to remove/clean up line breaks and stuff. If you use shift-enter instead of enter you should be in luck. Depending on your configuration, you might also have to edit the initialization settings in the js/tinymce/tiny_mce.js file and change these values to reflect:
    this.defParam(“force_br_newlines”, true);
    this.defParam(“force_p_newlines”, false);
    this.defParam(“convert_newlines_to_brs”, true);

    That’s what did it for me anyway…

    Oh, forgot this obvious change as well:

    this.defParam(“remove_linebreaks”, false);

    One last piece of advice for other newbies like me, shift-return works like a charm compared to plain old return in the WYSIWYG editor…

    Hi – I am trying to do the same thing. I need to add multiple line breaks, and WP appears to be stripping them out or ignoring them for some reason.

    I do not know what the tiny MCE editor is, I am not seeing that file anywhere in my installation, so I can’t make those changes you found. Using the shift-enter had no effect as well… Any other way to get it to let me add more space in my page?

    Well, the OP never said till the end he’s using WP 2.0. That’s the one coming with the wysiwyg editor (a.k.a. tinyMCE).

    As far as I remember in 1.5.x that’s how it works: you cannot have more blank lines.

    themandril: YOU RULE!!!!

    I was starting to f%^$^%king hate tinyMCE for cleaning up < br >. I now still have a center problem, sometimes it just does not center. The first pic it will but the second it refuses!

    FYI this is where that file is that u edit

    wordpress/wp-includes/js/tinymce

    it also strips &nbsp from my posts when i enter them in html. How do i get it to stop removing them? Basically I’m trying to figure out how to tab in the first line…

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘[Resolved] Cannot force line breaks in post!’ is closed to new replies.