{"id":7,"date":"2014-01-08T20:17:00","date_gmt":"2014-01-08T14:17:00","guid":{"rendered":"http:\/\/promincproductions.com\/blog\/?p=7"},"modified":"2014-05-03T09:09:15","modified_gmt":"2014-05-03T03:09:15","slug":"wordpress-remove-auto-adding-of-wpautop","status":"publish","type":"post","link":"https:\/\/promincproductions.com\/blog\/wordpress-remove-auto-adding-of-wpautop\/","title":{"rendered":"WordPress &#8211; Remove auto adding of  &#8211; wpautop"},"content":{"rendered":"<p>I created a page in WordPress, switched to Text mode and added some HTML and Javascript code. &nbsp;All should be good, right?<\/p>\n<p>Well WordPress started to add some  tags wherever it felt like&#8230; &nbsp;So my clean HTML was becoming dirty WordPress HTML as I call it&#8230; &nbsp;frustrating, right? &nbsp;So what&#8217;s a good blog developer to do?<\/p>\n<p>Thanks to some searching, I found one reference that fit the trick. &nbsp;In the PHP template file for my page layout I was using, I simply added this line of code to the top of the page.<\/p>\n<p>That&#8217;s it! &nbsp;I&#8217;m sure there are many other ways you could find to integrate this into the site, but for my needs this was perfect.<\/p>\n<p>So what is it?<\/p>\n<p>Well in doing some digging, WordPress has a filter that turns double line breaks into HTML  elements for spacing.<br \/><a href=\"http:\/\/codex.wordpress.org\/Function_Reference\/wpautop\" data-lasso-id=\"22\">http:\/\/codex.wordpress.org\/Function_Reference\/wpautop<\/a><\/p>\n<p>While they see this as a feature &#8211; and it very well might be for those that don&#8217;t get code as well as I do &#8211; I found it annoying that WordPress is modifying my HTML when I never asked it to!<\/p>\n<p>So pretty simple fix and allowed me to keep as many of the hairs on my already thinning head as possible.<\/p>\n<p>Happy WordPress themeing!!!!<\/p>","protected":false},"excerpt":{"rendered":"<p>I created a page in WordPress, switched to Text mode and added some HTML and Javascript code. &nbsp;All [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[9],"tags":[],"class_list":["post-7","post","type-post","status-publish","format-standard","hentry","category-wordpress-development"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4BbcR-7","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/comments?post=7"}],"version-history":[{"count":1,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/7\/revisions"}],"predecessor-version":[{"id":41,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/7\/revisions\/41"}],"wp:attachment":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/media?parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/categories?post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/tags?post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}