• I’m using the visual editor’s “insert read more tag” button to create the teaser that appears on my homepage. The teaser content includes a header (using h4) and a single-line paragraph. When it appears on the homepage there is no break between the headline and the paragraph. I also notice that when I look at the text editor WordPress doesn’t even use <p> tags.

    How do I get a separation between the headline and sentence in the teaser?

    The page is 2ndspdev.net. See the blurb for The Philadelphia Story at the bottom of the page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • For excerpts, WordPress strips out all tags, so you are left with a plain text string with no formatting – including paragraph delimiters. The only way I’ve found around this is to create my own archive/taxonomy templates to format the text the way that I want it to. But… Hopefully there’s someone else our there that could do better then that.

    You can use pseudo html tags for that issue, like we use for icon fonts.

    Example, if you have something like this in theme HTML and page editor :

    Read more >

    But you don’t see the ” > ” in actual web page.

    Add a class like this:

    Read more <span class="add-character-for-readmore"></span>

    Inside theme’s CSS file, tweak a bit with :after pseudo css class, it’s one of the best solutions:

    .add-character-for-readmore:after
    {
    (padding-left: 20px; content:">";)
    }

    This does not work well with inline css, so you have to make some tweaks in CSS file itself. For further information and examples, you can check how most icon fonts work, for instance the famous “Font Awesome”. It uses :after and :before pseudo css all the time.

    Hope it helps,

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

The topic ‘Paragraph breaks missing in "read more" excerpt’ is closed to new replies.