WordPress.org

Ready to get started?Download WordPress

Forums

Basic <p> and <br /> not saving/working, no timestamp edit (9 posts)

  1. paradox_tlc
    Member
    Posted 5 years ago #

    Hi!--I've just got the blog running, all seems well, but I can't get any paragraph formatting to stick, either with a <p> or
    tag in the html view.

    In the Visual view all the paragraph formatting is as it should be, but it won't work on a save or preview. So add the tags in html view and it still will not format a paragraph. Anyone have any idea what could be wrong?

    Also, I have a manual migration from past content with specific timestamps I don't want to lose, yet when I manage posts there is no way to set the date and time, apparently. I went into the writing settings and there seemed to be no way to do it there either.

    Please have a great weekend, everyone.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Paragraphs and BR tags are added automatically by WordPress. You don't need to manually add them. Any that you do add will be discarded by default, in favor of WordPress' own formatting system.

    In the HTML view, hit enter twice to make a Paragraph, enter once for a line break.

  3. paradox_tlc
    Member
    Posted 5 years ago #

    Html view offers nothing in adding a break or paragraph tag, either with the enter key or manually.

    In the Visual view the line breaks and formatting are correctly there. Preview or Save removes them, they...are...gone on publish. Go to html view and they are not there. Manually enter them or use the Enter key it makes no difference, the formatting will not stick.

    Something has gone wrong or I am missing something on an extremely basic level, oy, formatting is not exactly a new task in my web career.

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Html view offers nothing in adding a break or paragraph tag, either with the enter key or manually.

    No, you misunderstand me. Your content should not have any P or BR's in it. You won't see them, ever. They are added after the fact, at display time on your post. Your actual content in the database should be plain text and line breaks and such. No formatting.

    Normal human beings do not know HTML. They do not have to expect to edit HTML. So WordPress hides some of the HTML from them and deals with it itself. That's why there's the visual editor and the more plain text editor. Of course, some HTML is still visible, like images and headers and so on, but the basic P/BR stuff is fully automatic, and hidden.

    What is a link to the post where you're having the problem?

  5. paradox_tlc
    Member
    Posted 5 years ago #

    Very unfortunately it's a new site in workup, I'm on a vanity url until I turn the site on, I can't give out the url publicly yet.

    I just tried a new post in Visual. The blog is giving me one line break only for a paragraph tag, I need a double line break for that, precisely as formatted here, I'm not asking for much.

    Hold the shift key while imputing Enter twice, standard html editor input behavior, nothing. Use the Enter key plain, nothing. Look for html tags in the html view, what a concept, nothing.

    [stares at WordPress trademark] This has to be me, I am simply missing it here. I'll step back a bit and then look again when I'm not irritated. Beers at lunch would help. Right?

    Thanks for the replies. I'll get there.

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    The blog is giving me one line break only for a paragraph tag, I need a double line break for that, precisely as formatted here, I'm not asking for much.

    Okay, well, you have to understand exactly what you're asking for here.

    Try to think about this somewhat differently. Separate the LOOK from the CONTENT. Right now, you want to make paragraphs farther apart. That's about the LOOK of the page. But, to do that, you're attempting to insert extra line breaks and such. That's the CONTENT. These are two different pieces.

    In other words, you're doing it wrong.

    Instead, you should look at editing your theme's stylesheet. Without actually looking at it, I cannot tell you exactly what to add to it, but it might be as simple as increasing the bottom margin on your content's paragraphs a little bit. Maybe sorta like this:

    #content p {
    margin-bottom: 2em;
    }

    Or similar. The point is that whenever you want to change the way a thing looks, you should instantly think about how to edit the theme itself, not try to go and edit the post content. The theme controls all aspects of how the site looks. The content just has a bunch of text in it. See?

  7. craigvansant
    Member
    Posted 5 years ago #

    Excellent! I was having the same challenge. I revisited the style sheet of my theme and added

    p {
    margin-bottom: 2em;
    }

    now paragraph spacing was working with the visual editor.

    Thanks!

  8. tkm
    Member
    Posted 4 years ago #

    Man! I've been searching hard to resolve this one. And... finally... I've sorted it. So thanks to Otto42 and craigvansant!

    I also found that in the Visual Editor I had to select "Paragraph" from the Format drop-down menu. You can find this menu by clicking the last icon on the right on the Visual Editor bar (Show/Hide Kitchen Sink - has lots of different coloured dots).

    Hope somebody finds this useful.

  9. aaron1728
    Member
    Posted 4 years ago #

    <!--begin 1--><!--pluginname=argument1,argument2,argument3--><!--end 1--><!--begin 2--><!--pluginname=argument1,argument2,argument3-->
    <!--end 2--><!--begin 3--><!--pluginname=argument1,argument2,argument3--><!--end 3-->

    When I view code, I see:

    <div class="entry">
    				<p><!--begin 1--><!--pluginname=argument1,argument2,argument3--><!--end 1--><br />
    <hr /><!--begin 2--><!--pluginname=argument1,argument2,argument3--><!--end 2--><br />
    <hr /><!--begin 3--><!--pluginname=argument1,argument2,argument3--><!--end 3--></p>

    There are no linebreaks or extra lines inside the post. It's a contiguous stream of code and WP is inserting the br and p tags.

Topic Closed

This topic has been closed to new replies.

About this Topic