# Disable Automatic Paragraphs

> Stops WordPress from wrapping text in paragraph tags and adding line breaks in classic content and excerpts. Block content is not affected.

- Type: PHP
- Runs: Run everywhere
- Category: [Content](https://wpide.com/library/category/content/)
- Tags: content, wpautop, formatting
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/disable-automatic-paragraphs/

## Code

```php
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
```

## Notes

Existing classic posts written without HTML paragraphs will appear as one block of text.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Disable Automatic Paragraphs" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
