Support » Everything else WordPress » Paragraph tag being inserted after horizontal rule

  • It seems that WordPress is automatically inserting </p> after <hr />. How can I prevent this? The “WordPress should correct invalidly nested XHTML automatically” option is turned off and there are no non-closed paragraph tags.

Viewing 5 replies - 1 through 5 (of 5 total)
  • When I place an <hr /> on its own line with returns between the lines above and below:

    Paragraph above the hr tag.

    <hr />

    Paragraph below the hr tag.

    WordPress does not insert additional paragraph or break bags. Where are you placing it? If as above, are you running any text formatting plugins?

    The HTML looks like this:

    <div id="foo">
    <hr />
    <ol>

    And no, I’m not running any text-formatting plugins.

    I’d have to call that a bug.

    I’ll file a report, but for now you can fool WordPress by doing this:

    <div id="foo">
    <hr /><ol>
    <li>

    davfink10

    (@davfink10)

    Just to add fuel to the fire – I have experienced this exact same thing – I’d second the bug theory.

    Another work around is this:

    <div class=”hr”><hr /></div>

    works fine – plus gives you extra styling capabilities.

    jblanton

    (@jblanton)

    You might want to check out this post I put up a while ago.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Paragraph tag being inserted after horizontal rule’ is closed to new replies.