More than 1000+ satisfied clients and counting, since 2010


How to disable auto formatting in WordPress?

Auto formatting has a been a feature that has drawn much appreciation for WordPress blog handling system over  the past 7-8 years as it has helped novice bloggers start off without having to worry about text formatting, text wrapping and image positioning within their blog to make their content look attractive and beautiful which would result in increased readership.  This feature actually adds the paragraph <P>  tags, break line <BR> tags and many other auto text formatting tags and at many instances also removes the above mentioned for a clearer view of the post content. While most of the bloggers think this to be a useful feature some have come to see it as a feature that is no more of use but which still exists. Thus given the huge demand from various WordPress users, this article focuses on how to disable auto formatting in WordPress. Read through to know how to disable auto formatting in WordPress.

Multiple ways of disabling auto formatting exists, the simplest being the use of plugins that do the alterations in core file’s code for you. To name a few plugins we have ‘syntax highlighter plugin’, ‘encode all codes manually’ but they have been reported to have their own weak areas of action. There happens to be another plugin by the name PS Disable Auto Formatting which belongs to WordPress itself that puts an end to the automatic formatting issue by implying a filter upon use of ‘wpautop’ in the functions.php file and further modifies the HTML source code to suit the new settings. Thus plugin has had a good response too as it, while editing the HTML source code, stops unintentional deletion of paragraph <P> tags and break line <BR> tags adding to which when editing the content in visual mode it happens to generate a natural looking response to changing lines and paragraph indentation. PS Disable Auto Formatting happens to have certain set of features that provides an edge to it over other plugins and those include disabling auto-formatting in every post, excerpt, comments and terms description in all of the blog, Stopping auto removal of the paragraph <P>  tags, break line <BR> tags while in HTML mode and lastly, batch formatting all earlier posted articles that saves time as well gets the job done.

While most of the bloggers might be opting for the plugin solutions, there exists a section dwelling deep into the code details of every problem and try to find a solution in terms of code lines. For them, we have incorporated another working and efficient solution that involve a code snippet that needs to be slipped in to the functions.php file after which it will act as a filter which blocks out the wpautop and it’s short codes to cuts down the auto formatting feature’s employability. It is a really simple yet efficient php script code that is shown below:

remove_filter( ‘the_content’, ‘wpautop’ );

add_filter( ‘the_content’, ‘wpautop’ , 99);

add_filter( ‘the_content’, ‘shortcode_unautop’,100  ;

The given plugins and code shall serve your purpose while you enjoy complete freedom of formatting.

Written by

The author didnt add any Information to his profile yet