Trying to add HTML into a page

I’m trying to figure out where this extra code is coming from, I tried to add HTML to a page

<h2>Preschool Room</h2>
<img style="float: left;" src="http://www.meadowlarkpreschool.com/new_wordpress/wp-content/uploads/2015/04/pre1.jpg" alt="" width="350px" />
<img style="float: left;" src="http://www.meadowlarkpreschool.com/new_wordpress/wp-content/uploads/2015/04/pic2.jpg" alt="" width="250px" />
<h2>Infant Room</h2>
<img style="float: left;" src="http://www.meadowlarkpreschool.com/new_wordpress/wp-content/uploads/2015/04/pic4.jpg" alt="" width="350px" />
<img style="float: left;" src="http://www.meadowlarkpreschool.com/new_wordpress/wp-content/uploads/2015/04/pic3.jpg" alt="" width="350px" />
<h2>Art Studio</h2>
<img src="http://www.meadowlarkpreschool.com/new_wordpress/wp-content/uploads/2015/04/pic5.jpg" alt="" />

and this is the result

If you view the source,

<h2>Preschool Room</h2>
<p><img style="float: left;" src="http://www.meadowlarkpreschool.com/new_wordpress/wp-    content/uploads/2015/04/pre1.jpg" alt="" width="350px" /><br />
<img style="float: left;" src="http://www.meadowlarkpreschool.com/new_wordpress/wp-content/uploads/2015/04/pic2.jpg" alt="" width="250px" /></p>
<h2>Infant Room</h2>
<p><img style="float: left;" src="http://www.meadowlarkpreschool.com/new_wordpress/wp-content/uploads/2015/04/pic4.jpg" alt="" width="350px" /><br />
<img style="float: left;" src="http://www.meadowlarkpreschool.com/new_wordpress/wp-content/uploads/2015/04/pic3.jpg" alt="" width="350px" /></p>
<h2>Art Studio</h2>
<p><img src="http://www.meadowlarkpreschool.com/new_wordpress/wp-content/uploads/2015/04/pic5.jpg" alt="" /></p>

how do I stop it from adding the extra code?

Thanks

I must be missing something. Both of your code samples look identical. What extra code are you referring to?

On line 2 and 7 there are opening paragraph tags, and closing ones on lines 5 and 10.

And also open and closing ones on the last line.

WordPress tends to do this sometimes. Try disabling the filter:

http://codex.wordpress.org/Function_Reference/wpautop#Disabling_the_filter

Thanks, I created a child theme with only style.css to point to sela as its parent

But when I try to copy selas functions.php file into the new child themes folder and thy to add those 2 lines to disable the filter, I get a blank page until I remove the file (functions.php)

I thought that was the was to get a functions.php file into your child theme sop it could be edited without messing withe the parent.

Am I missing something?

dang ,
https://codex.wordpress.org/Child_Themes
I shouldn’t of copied sela functions.php file, but rater started a new one.

Does the filter work now?

yes, thank you, it worked great after i fixed my mistake

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.