WordPress.org

Ready to get started?Download WordPress

Forums

[closed] It's 2013! Why don't BR tags work properly!?!?!? (10 posts)

  1. rmmoul
    Member
    Posted 1 year ago #

    When I intentionally add <br> tags while in the text editor portion of the post or page editor, I've done it for a reason. I'm seeing posts from people complaining about this crap going back over 2 years...

    No other form of hacking it with <p> tags or nbsp;'s is acceptable. Wtf?

    Does anyone know of a way to hack the core (because that should be necessary for something like this?) to stop the damn editor from screwing up such a simple html tag?

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Which editor are you using?

  3. rmmoul
    Member
    Posted 1 year ago #

    The default one that comes with wordpress.

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    Text or Visual?

  5. rmmoul
    Member
    Posted 1 year ago #

    ...while in the text editor portion of the post or page editor....

    When in the text edit mode, not the visual side. If I ad <br><br><br> I only get one line break instead of 3.

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    Have you checked that this isn't a CSS line-height issue?

  7. Mark / t31os
    Moderator
    Posted 1 year ago #

    It would help if you could link to page which illustrates the issue you're describing.

  8. You can remove the `wpautop' filter from the content then replace it setting the $br param to false which will allow you to add multiple br tags after paragraph breaks.

    remove_filter( 'the_content', 'wpautop' );
    
    add_filter( 'the_content', 'pee_allow_br' );
    function pee_allow_br( $content ) {
        $content = wpautop( $content, $br = false );
        return $content;
    }
  9. Marco Milesi
    Member
    Posted 1 year ago #

    I suggest you to use the <br/> tag and nothing else...
    This simply works!

  10. Chip Bennett
    Theme Review Admin
    Posted 1 year ago #

    When in the text edit mode, not the visual side. If I ad <br><br><br> I only get one line break instead of 3.

    Do you, by chance, switch between the HTML and Visual editors?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags