Support » Everything else WordPress » Possible feature: disable auto-formatting?

  • Hi there! I’m loving WordPress since I moved over from Moveable Type. About the only thing MT had over WP was the ability to turn off the auto-formatting. I just find it easier to put my own HTML codes in my posts, especially if I’m going to include a picture or goofy effect.

    I haven’t found a way to disable the auto-formatting in WP. Am I just overlooking something obvious, or is that really not an option?

Viewing 9 replies - 1 through 9 (of 9 total)
  • In the site admin area, go to the Options menu, then Writing – it’s the 3rd option down – just uncheck the things you want unchecked 🙂

    That’s only a small part of it, RustIndy. It doesn’t turn off the wpautop function (automatic paragraphing).

    You can try commenting out the lines
    add_filter('the_content', 'wpautop');
    add_filter('the_excerpt', 'wpautop');

    in the beginning of wp-includes/template-functions-post.php

    Although commenting out those lines will work, when you upgrade later, they’ll just be there again. A nice approach would be to create a simple little plugin using
    remove_filter(‘the_content’, ‘wpautop’);
    remove_filter(‘the_excerpt’, ‘wpautop’);

    That way you can easily turn them on and off by activating/deactivating the plugin.

    Interesting, I only have two options–one for converting emoticons to graphics, and one for correcting invalidly nested XHTML. I’m using 1.2.2. Was this a plugin?

    Bertha…. try pasting this code into a file, say call it disable-wpautop.php and upload it to your plugins folder, then activate it through the plugin section of the admin.

    Plugin Name: Disable WPAUTOP
    Version: 1.0
    Plugin URI:
    Description: Disables the wpautop function for the_content and the_excerpt.
    Author: Nick Momrik
    Author URI:
    remove_filter('the_content', 'wpautop');
    remove_filter('the_excerpt', 'wpautop');

    Make sure not to have any blank lines/spaces before <?php or after ?>`

    That’s a good idea MtDewVirus. I may actually use that myself!

    MtDewVirus–that worked! Thank you thank you thank you! *kisses feet*

    You’re welcome. Glad to hear it worked. 🙂

    Plugin has been added to the WP Plugin Repository…

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Possible feature: disable auto-formatting?’ is closed to new replies.