• I’m using 2.3.3 and whenever I put in a linebreak, wordpress strips it out. So paragraphs are bunched together.

    If I put in a < br > or a < p > in the html code, then I hit publish, and WordPress takes that formatting out. So when I write a long post its 1 big block. Theres no line breaks.

    Anyone know how I can allow linebreaks or paragraph breaks in the code?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Unlike with offline word processors, empty paragraphs and multiple line breaks are not correct for web text and so WordPress correctly strips them out. If you need more space between paragraphs, add more bottom margin or padding to p in your css. Also, <br> is not correct XHTML, and <br /> should be used instead.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Anyone know how I can allow linebreaks or paragraph breaks in the code?

    You can’t. WordPress strips those out for a reason.

    Your content should just contain the content. Not formatting and display information. If you want to add vertical spacing on your website, then you should edit the stylesheet to make more vertical spacing where you want it.

    Remember, your content is also used in feeds and other places. Not everybody sees your content on your site itself. So putting formatting into the content is not the correct thing to do.

    Thread Starter marc100

    (@marc100)

    but this looks terrible
    https://www.pursepage.com/other-designer-handbags/pursepage-exclusive-5-questions-for-andrew-cotton-of-linea-pelle.html
    we gave an interview and cant put a space between the responses?

    I dont like that WordPress decides for me that my site shouldnt look good, and it should just be a ball of text.

    I dont like that WordPress decides for me that my site shouldnt look good, and it should just be a ball of text.

    That is your theme designer’s fault, not that of WordPress. I looked at your theme’s css and observed poor spacing choices and obvious errors. I’d recommend switching to a different theme.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    we gave an interview and cant put a space between the responses?

    Whoever said that? Of course you can. You just have to do it the right way. Adding line breaks to your content is not the right way.

    Edit your theme’s style.css file and add this to the .entry p section:
    margin-bottom: 2em;
    If you want more space, increase the number.

    See, the stylesheet and your theme defines how the page LOOKS. The content only defines what is ON the page. That’s the whole point, to separate content from presentation.

    WordPress is a Content Management System. It does not control the look of your site at all. The theme does that.

    Thread Starter marc100

    (@marc100)

    omg it works now. thank you Otto!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cant use linebreaks in posts?’ is closed to new replies.