Forums

Paragraph tag being inserted after horizontal rule (6 posts)

  1. jblanton
    Member
    Posted 4 years ago #

    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.

  2. Kafkaesqui
    Moderator
    Posted 4 years ago #

    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?

  3. jblanton
    Member
    Posted 4 years ago #

    The HTML looks like this:

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

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

  4. Kafkaesqui
    Moderator
    Posted 4 years ago #

    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>

  5. davfink10
    Member
    Posted 3 years ago #

    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.

  6. jblanton
    Member
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.