Disable wpautop Plugin
A simple plugin to disable the WordPress wpautop function. This is the function that automatically formats your posts.
Installation
Installation is just like any WordPress plugin:
- Download disable-wpautop.zip
- Unzip
- Upload to
/wp-content/pluginson your server - Activate the plugin
You can find full details of installing a plugin on the plugin installation page.
If you find that breaks (<br/>) are being stripped from your posts then look at this WordPress support page.







43 Comments
Oct 9, 2006 3:59 am |
John,
I have today installed the plugin, but Wordpress is Still (gRr) formatting my HTML when i place it in using the source editor. What version was this plugin built for please?
Thanks
Mark
Feb 3, 2007 11:38 pm |
My friend, you just saved my life.
Feb 12, 2007 7:10 pm |
Excellent plug-in. The auto P tag was driving me crazy. Thanks for taking the time to fix the problem.
Feb 23, 2007 11:07 pm |
Same here for me--doesn't work! I'm on 2.1.1.
Feb 24, 2007 10:58 pm |
Using Wordpress 2.1, the one that has the p/div tag issue.
This plugin is a godsend to me. Thanks ever so much. I have gone two nights without sleep to fix that damn bug and now I can finally get some rest.
Cheers to you, man.
Mar 12, 2007 11:01 am |
No dice on WP 2.1.1. Any chance of an upgrade?
Mar 14, 2007 5:07 am |
wildframe, cutout: I'm using it on WordPress 2.1 and it works fine. Can you give me some details about how it's not working for you?
Mar 14, 2007 10:54 am |
Apologies: I installed 2.1.2 from scratch and all seems to be well -- thanks for this plugin! I'll report back if there's any weirdness.
Apr 21, 2007 5:29 pm |
I'm using WP 2.1.3. I navigated to the Code tab and placed tags After that I saved the post. Now when i open the same post and again go to the Code view, the tags aren't there anymore?
You can have a look at my blog, the top post is the one that doesn't retain the p tags. I installed Ardvark extension for FF (https://addons.mozilla.org/en-US/firefox/addon/4111) to see which code was WP applying to the paragraphs. It says "p class para" I have no class by the name of para in my CSS.
Thanks in advance.
Apr 21, 2007 5:31 pm |
Installed the p and then checked the cde WP was applying to the paragraphs using the AardVark extension in FF (https://addons.mozilla.org/en-US/firefox/addon/4111). It says "p class para". the is no para class in my CSS.
Apr 27, 2007 12:44 am |
Manu, this plugin doesnt change a post at all, just how it is displayed. I don't know what you mean by 'p class para'
Jun 28, 2007 10:41 am |
Question for you: I have been editing and re-editing fricken tags over and over because WP keeps clearing out my "style='float:right'". It works once, but if I go to re-edit the page for any reason, it strips out the style tag.
will this plugin stop that behavior? Yes, I know, use css.
ps, I highly recommend you get and install the "subscribe to comments" plugin. lets users subscribe to the comments and get notified when a comment is replied to. Generates more page views as well as happy commenters getting answers to their questions
Jun 28, 2007 8:32 pm |
Rob, are you logged in as an admin user? WP can strip certain things out if you are not admin. This plugin may solve your problem (but then it may not be the fault of the auto paragraph function). I've tried entering style tags myself and it works fine, so something is definitely playing with you.
Subscribe to comments is coming soon along with a forum!
Jul 7, 2007 4:10 am |
HI Guys,
I am using WP 2.1 and also had the plugin fail. However, I thank John for taking the time to share his findings, and develop a plugin.
I was having the "div" tags stripped out of my pages and replaced with "p"'s. What happens is TinyMCE is programmed to replace tags it does not recognize. Therefore, we just need to bring whatever the 'problem' tag is to TinyMCE's attention, and let it know we want to include it as a valid tag/element.
Here is the solution I found for correcting the "div" issue. You can use these same instructions for including additional tags however.
1. Open the file called tiny_mce.js located in the wp-includes\js\tinymce folder
2. Goto line 130 - look for this: this._def("extended_valid_elements", "");
3. Change it to this: this._def("extended_valid_elements", "div[id|class]");
Note - You can add other tags in here too if they are giving you problems. Just separate the elements with commas, and include any sub elements within the brackets (I have added the id and class sub-elements above so that they will not be stripped out of the div element. If you wanted to add "style" as a sub element, just append a "|" (no quotes) to "class" and end up with: div[id|class|style]). If you wanted to add an additional element, do this: "div[id|class],br,embed[class|id]". There should only be one set of quotes embracing all of your elements.
That's it! Hope it helps. I cannot promise this will work for everyone, but it worked for me. Best of luck!
Jul 19, 2007 3:45 am |
My website - notsonews.com - is powered by wordpress 2.2.1 and this plugin works like a charm. I have posted a "thank you" message and a "do follow" link towards this page on my about pages. Many Thanks!
Aug 18, 2007 4:59 pm |
In the event that you don't want to disable wpautop entirely...
Aug 18, 2007 5:00 pm |
http://yeago.net/works/problem-issue-with-wordpress-messing-up-html-with-p-and-br-tags
...woops. Must not understand the a tag as well as I thought. =)
Jan 2, 2008 3:16 am |
Once again a lifesaving plugin. Next time, I won't even try to find answers to my issues from Google or Wordpress support forums. I'll come straight at the Urban Giraffe. My issue was that I was pasting bits from old html pages (with linefeeds in-between p tags, which are supposed to be transparent), and the wordpress editor (even the 'code only') managed to make every single line into a paragraph. Solved now. Thank you so much.
Jan 15, 2008 5:23 pm |
Nothing beats a plugin with a total of two lines of code, I like it. Thanks for keeping it short and simple.
Feb 2, 2008 3:27 pm |
Great plugin. You saved me a lot of headaches. Thank you.
Mar 21, 2008 2:47 am |
I will use this plugin in my wordpress blogs. I really find the auto format of WP annoying at times. i hope this will help. thanks.
May 28, 2008 5:02 am |
Thank you very much!
This is a lifesaver, the default behaviour was driving me mental!
Cheers
Jun 11, 2008 2:22 pm |
I have problem with for long. Now I hope this solve my problem
Jul 19, 2008 6:25 pm |
This plugin is incompatible with TinyMCE, since whenever you'll edit your page in WYSIWYG, it will remove all the p tags you've put in.
I couldn't get the Scott's suggested hack fix (above) to work with WP 2.5.1, and concluded that disabling wpautop is probably much more complicated than this plugin makes it seem.
Aug 8, 2008 3:29 am |
Just want to say many thanks for your plugin. Really make me very happy to found this one.
Nov 21, 2008 4:40 am |
Can I use this plugins in WP 2.6.2 ?
Nov 23, 2008 4:00 am |
This works with any version of WP. It does not remove paragraph tags when using TinyMCE
Feb 4, 2009 9:45 am |
Don't look to work for wordpress 2.7.
This xxx autop drive me crazy, please provide some help ...
Feb 4, 2009 10:59 am |
Works fine for me in 2.7
Jun 1, 2009 12:09 pm |
Thank you so much for that plugin! For me it works perfect in WP 2.7
Jul 10, 2009 3:40 pm |
Okay so I am just as annoyed at the behavior of this plugin as I was with my initial problem. I want something to work on a per post basis. I installed this plugin and everyone of my posts (and pages) suddenly had no paragraphs or breaks in them! It was like one HUGE run-on sentence. I checked every support page I can find yet nothing. One page told me there is some sort of config page that can fix this, but atlas, no config page can be found in my dashboard or menus at all.
See the problem is 1 post of mine has a form in it. Every textarea and input box gets its own line break! So if I say "username: [input]" the output on worpress becomes "username:[br] [input][br]". I don't want to have to edit hundreds of posts to fix my past posts linebreaks, nor do I want the linebreak to be fixed in the future.... I only want it for this post!
Sep 9, 2009 2:51 pm |
This plugin affects all posts.
Sep 25, 2009 10:26 am |
Thanks for That Plugin, you are The MAN!!!!!
Dec 5, 2009 9:52 pm |
Thanks for the thought, but I just got this plugin for WP 2.8.6 and it removes all my paragraph formatting on my pages only! Doesn't seem to effect posts, but now my pages are just one big paragraph. I guess it doesn't work for everyone. I see WP has been ignoring this issue for over a year.
Jan 2, 2010 8:21 am |
The plugin works on both posts and pages. It is designed to remove the formatting.
Pings & Trackbacks
wordpresscn.com, blue-anvil.com, entirelysafeandfun.com, onethingnew.com, geniusone.com, scratch99.com, internet-solutions.si, cywhale.de, yeago.net, moushigo.com, yokogo.main.jp, chanto-web.net, tv-game.jp, tv-game.jp, mikeschinkel.com, yukinachu.com, wp-guide.net, individuallocker.com, wp-plugin-archive.de, im-tal.net, blog.dieweltistgarnichtso.net, ohhappy.dip.jp, ohhappy.dip.jp, decopeco.com, memo.seobinder.net, c-styles.jp, docdetox.com, docdetox.com, wordpressgarage.com, 930en.com, yuina.lovesickly.com, 930en.com, blog.duskfalls.org, emptyspace.razor.jp, dquinn.net, wikeb.com, blogaetan.net, aspnetprogrammer.net, kusakabeworks.net, kusakabeworks.net, yoko.up-point.net, jealousdesigns.co.uk, gale.co.jp, wpmash.com,
Leave a Reply