Code and Core Remove Empty P Tags

Code and Core Remove Empty P Tags

Details
View on WordPress

The Code and Core Remove Empty P Tags plugin helps keep your WordPress content clean by removing:

  • Empty <p> tags
  • <p> tags that contain only &nbsp;

A checkbox is added in the default WordPress editor for posts and pages.
When the box is checked, the plugin cleans your content during save.

This plugin does not work automatically — it only runs when the user chooses to clean the content.

Important Limitations:

  • ✔️ Only works with Posts and Pages
  • ✔️ Works only with the default WordPress editor
  • ✔️ Cleaning happens only when the checkbox is selected
  • ❌ Does not work with Custom Post Types
  • ❌ Does not work with Elementor, Divi, WPBakery, or other page builders

Key Features

  • ✔️ Removes empty <p> tags
  • ✔️ Removes <p>&nbsp;</p>
  • ✔️ Checkbox inside the editor allows manual cleanup
  • ✔️ Lightweight and simple
  • ❌ Not automatic — cleaning happens only if enabled
  • ❌ No effect on custom post types or page builders

How It Works

  1. Edit a post or page using the WordPress default editor.
  2. A checkbox will appear labeled: “Remove empty paragraphs and non-breaking spaces”
  3. When the checkbox is checked, the plugin scans your content and removes:
    • <p></p>
    • <p>&nbsp;</p>
  4. The cleaned content is saved; the original content remains unchanged unless you choose cleanup.

Why Use This Plugin?

  • Avoid unwanted spacing caused by blank paragraphs
  • Keep HTML cleaner for better readability
  • Great for bloggers, editors, and developers
  • No configuration required
  • Provides manual control instead of automatic cleanup

License

This plugin is released under the GPL v2 or later license.
You are free to use, modify, and distribute this plugin under the terms of the GNU General Public License version 2 or later.

Privacy Policy

This plugin does not collect, store, or process any personal data.

Details

Plugin code:
code-and-core-remove-empty-p-tags
Plugin version:
1.0.0
Outdated:
No
WP version:
5.0 or higher
PHP version:
7.4 or higher
Test up to WP version:
6.8.3
Total installations:
50
Last updated:
2025-11-21
Rating:
Times rated:
0
cleanup
content
formatting
paragraphs
wp-editor