Empty P Tag keeps your front-end markup clean when WordPress, themes, builders, or editors insert unwanted empty <p> / <br> tags that create awkward spacing.
The problem
Empty paragraphs and stray breaks often appear after pasting content, mixing classic and block markup, or using WYSIWYG fields. They push layouts apart and are hard to spot in the visual editor.
What it does
- Removes empty paragraph tags (including whitespace-only and
paragraphs)
- Optionally disables WordPress
wpautop on content, excerpts, and text widgets
- Cleans comments, term descriptions, and Advanced Custom Fields (optional)
- Limits cleanup by post type or excluded post IDs
- Lets you skip cleanup on a single post/page
- Optional per-post clean-on-save for permanent database cleanup (off by default)
- Live Before → After HTML preview on the settings screen
- One-click presets: Recommended (safe), Classic, or Aggressive
Safety first
Front-end cleanup is non-destructive: the plugin filters rendered output and does not rewrite post content in the database unless you explicitly enable clean-on-save on a post.
Useful when
- Classic editor / mixed content leaves empty paragraphs behind
- Comment systems or WYSIWYG fields add extra vertical space
- You want
wpautop off in some places, but normal paragraphs elsewhere
- You need ACF WYSIWYG output without empty spacer paragraphs
Page builders
Plugins like Elementor often render outside the_content. Empty P Tag cleans WordPress content filters (posts, excerpts, widgets, comments, terms, ACF). It does not rewrite every builder canvas.
Privacy
This plugin does not collect, store, or send personal data. There is no telemetry.
Developers
Filters include:
haq_empty_p_tag_settings
haq_empty_p_tag_should_clean
haq_empty_p_tag_before_clean
haq_empty_p_tag_clean_pattern
haq_empty_p_tag_cleaned_content
Release Notes — Version 6.0.0
This release turns Empty P Tag into a clearer, safer, more flexible cleanup tool while keeping older sites stable.
What’s new
- One-click presets: Recommended (safe), Classic Empty P Tag, and Aggressive spacing fix
- Live Before → After HTML preview on the settings screen
- Cleanup for comments, category/term descriptions, and optional ACF fields
- Limit cleanup by post type or excluded post IDs
- Per-post Skip cleanup control (classic editor + block editor sidebar)
- Optional per-post clean-on-save (off by default — only rewrites the database when you choose it)
- Safer cleaner: optional HTML tag balancing, configurable filter priority
- Multisite-aware uninstall and updated WordPress.org documentation/assets
- Requires PHP 7.4+, WordPress 5.8+, tested up to WordPress 7.1
Upgrade notes
- Existing sites keep classic defaults for missing settings so layouts should not suddenly change
- New installs get the Recommended (safe) preset: empty-tag cleanup on,
wpautop left alone
- After updating, open Settings → Empty P Tag and review the active preset