[Resolved] Excerpt loses newlines

Home Forums Support [Resolved] Excerpt loses newlines

Home Forums Support Excerpt loses newlines

  • This topic has 4 replies, 3 voices, and was last updated 7 years ago by Tom.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #305294
    Luca

    Dear all,
    hi everybody.

    I am relatively new both to WordPress and GeneratePress, so apologies if this is a silly question.

    I would like the home of my blog to show excerpts of my posts (only one so far). I managed to find the option to show excerpts but the problem is that in the home page newlines are deleted.

    I would like to show two or three paragraphs in the blog home and have them separated with a new line, as they appear in the blog post page. What should I change to have it displayed this way?

    Thanks a lot for the help!

    Cheers,
    Luca

    #305439
    Leo
    Staff
    Customer Support

    Hi Luca,

    Not quite sure what you meant by “new lines are deleted?”

    I assume you’ve tried changing the Excerpt Length in Customizer > Blog > Blog Content and that’s not what you wanted?

    Can you provide a link to your page and perhaps show an example of what you have in mind? Thanks!

    #305514
    Tom
    Lead Developer
    Lead Developer

    Excerpts remove all HTML, including line breaks.

    If you want to include line breaks/HTML in your excerpts, you need to use the more tag: https://docs.generatepress.com/article/using-the-more-tag/

    #305767
    Luca

    Thanks for both answers!

    Tom’s one is what I was looking for, thank you so much ๐Ÿ™‚

    #305963
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.