• Resolved komaljha

    (@komaljha)


    Hi
    i want to give a line break but unfortunately it doesn’t work. even i tried manually input <br /> tag in text mode but no effect.
    please advice me.
    Thanks
    komal

Viewing 7 replies - 1 through 7 (of 7 total)
  • Can you please post a link to the page or post where you inserted the <br /> tag? You’re not trying to insert it into the site title or page title, are you, because HTML code usually gets stripped out of those elements.

    Thread Starter komaljha

    (@komaljha)

    i am trying to break a line in body content.
    here is my website url.
    http://www.smsduniya.com

    OK, so I see that you inserted page breaks in first post but it’s not showing up on the blog page. That is the default behavior of WordPress. That is, the the_excerpt() function strips out all shortcodes and HTML tags, so you will not see any formatting, like bold, italics, underline, or page breaks in post excerpts.

    There are a few things you can try:

    1. Use the <!--more--> tag. That is, in your post, insert the <!--more--> tag where you want the excerpt to end. Oftentimes excerpts created using the <!--more--> tag will retain any formatting.One advantage to using the <!--more--> tag is that you have full control as to how much text to display in the post excerpt.
    2. You can also try creating a manual excerpt. In the post editor, you should see a field labeled Excerpt. If you do not, then click the Screen Options tab in the upper right corner of the screen and check the box labeled Excerpt and that field should appear. Then copy & paste however much of the post you want to appear into that field. The manual excerpt field should retain any formatting.
    3. Use a plugin like Advanced Excerpt.

    Hi @crouchingbruin,

    I hope you are well today and thanks for helping out here in this forum.

    Your help here is really appreciated.

    Thanks,
    Vinod Dalvi

    cchartman1

    (@cchartman1)

    I don’t know about “proper html” or using css for this but I just used a simple <p> </p> and it appears to work for me.

    cchartman1

    (@cchartman1)

    ooops – Sorry, that post didn’t come out right. Seems the non-breaking space between the p tags is missing. I use the non-breaking space between the p tags to create a line break.

    CrouchingBruin

    (@crouchingbruin)

    Hi, @cchartman1, thanks for your reply, but as I noted above, the default behavior for WordPress is to strip out all HTML tags when displaying excerpts, so the paragraph tags would get stripped out as well. Not sure if the non-breaking space would get stripped out too, but without the paragraph tags, there probably won’t be a line break.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘line break not working’ is closed to new replies.