Stripping out or disallowing <br> tags in Wordpress

Discussion in 'WordPress' started by JakeThePeg, Dec 11, 2008.

  1. #1
    How do I go about stripping or disallowing <br> tags and </br> tags from my posts? They are ruining my template, causing all sorts of huge gaps in text whenever they appear.

    Does anyone have any suggestions as to how I either disallow the tags, or strip them out of the posts once saved?

    www.helloelbow.com is the Wordpress blog template that I am having the issus with ...
     
    JakeThePeg, Dec 11, 2008 IP
  2. JWRmedia

    JWRmedia Banned

    Messages:
    499
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The default Wordpress WYSIWYG editor really has a strange way of converting everything into HTML. I would suggest looking for a different WYSIWYG editor for Wordpress, or better yet, disable the visual editor and do everything purely with HTML.
     
    JWRmedia, Dec 11, 2008 IP
  3. JakeThePeg

    JakeThePeg Active Member

    Messages:
    230
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Hmm, possibly a good idea. The problem is that I have users on my Wordpress blog who are not overly web savvy, so the WYSIWYG editor is kinda necessary. So ideally I need to just put a 'block' on <br> tags, which seem to often be inserted when someone copies text from MS Word directly into the WYSIWYG editor.

    Any suggestions how I can overcome this?
     
    JakeThePeg, Dec 12, 2008 IP
  4. hmansfield

    hmansfield Guest

    Messages:
    7,904
    Likes Received:
    298
    Best Answers:
    0
    Trophy Points:
    280
    #4
    Don't use MS Word for posts. Use a plain editor like Notepad, or copy to notepad, just to strip the code, and copy and paste onto wordpress post editor.
     
    hmansfield, Dec 13, 2008 IP
  5. JakeThePeg

    JakeThePeg Active Member

    Messages:
    230
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #5
    Yeah, I've tried that, it still adds <br> tags for some reason.

    Plus, I've got other writers who sometimes aren't all that good at following instructions, so I need to make it fool proof :)
     
    JakeThePeg, Dec 13, 2008 IP
  6. mizaks

    mizaks Well-Known Member

    Messages:
    2,066
    Likes Received:
    126
    Best Answers:
    0
    Trophy Points:
    135
    #6
    Maybe a different WordPress editor like TinyMCE Advanced will solve the problem.
     
    mizaks, Dec 13, 2008 IP
  7. JakeThePeg

    JakeThePeg Active Member

    Messages:
    230
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #7
    I installed TinyMCE Advanced, although it helps show me where the <br/> tags are installed, it doesn't solve the problem. I want eradicate the possibility of <br> tags appearing in my posts all together if possible, because they make my page look plain ugly. For example, check this out... http://www.helloelbow.com/news/test-br-again/

    Is this something I should be able to fix with css or something? I'm going to cry soon this is frustrating me so much!
     
    JakeThePeg, Dec 14, 2008 IP