
Empty P Tag
v6.0.0Husain Ahmed · 2017年10月11日 上架
Remove empty paragraphs and fix awkward spacing without breaking your layout.
- 正在使用
- 700+
- 评分
- 5.0 / 5
- 累计下载
- 9,425
- 最近更新
- 2026年11月10日
贡献者
截图





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
wpautopon 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
wpautopoff 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_settingshaq_empty_p_tag_should_cleanhaq_empty_p_tag_before_cleanhaq_empty_p_tag_clean_patternhaq_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,
wpautopleft alone - After updating, open Settings Empty P Tag and review the active preset