• I am trying to insert a block of html onto a wordpress page. I have html comments and line breaks for readability. WordPress sees these line breaks and puts in <br> and all over the place, resulting in unwanted white space.

    I found a way around it by creating a separate template which includes the code for that page. I would like, however, to be able to do it through wordpress. I would like other authors to be able to edit the content without going into the template files.

    Has anyone figured out a way to keep wordpress from auto-inserting line breaks?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can try to remove_filter('the_content', 'wptexturize'); or to remove_filter('the_content', 'wpautop');

    HIH

    Thread Starter moui

    (@moui)

    I’m not sure where to make these php calls. I tried both of them at both the beginning and the end of my page (using ezStatic to eval the php). Where would you recommend putting it?

    that code goes in the template.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘paragraph tags around html comments’ is closed to new replies.