Support » Fixing WordPress » Preventing automatic paragraph and line break handling

  • Hello all,

    I’m new to PHP and WordPress in particular. So far things have been going pretty well setting up my WordPress blog, but there’s one remaining big issue…

    I use the code view in WordPress for adding new posts, but still WordPress wants to add its own <p> and <br> elements in some places when posts are rendered. One example is using <br> within blockquote elements….WordPress adds its own after each line whether I add them myself or not.

    For the most part, this is just a minor inconvenience that I can work around, but it becomes a big problem when I use <textarea> elements together with dp.SyntaxHighligher to post code snippets. Basically, dp.SyntaxHighligher is a free JavaScript library which reads the contents of marked textareas and converts their contents to ol elements which nicely display code samples. The problem is that by the time dp.SyntaxHighligher gets to it, WordPress has already added a bunch of <p> and <br> elements within the content, rendering the code samples unusable. See, e.g.,

    Can anyone help me figure out how to get around this, or better yet, disable WordPress’s auto break/paragraph handling? Thanks muchly.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Preventing automatic paragraph and line break handling’ is closed to new replies.