Description
Empty P Tag helps you keep clean front-end markup when WordPress, themes, or builders insert unwanted empty <p> / <br> tags that create awkward spacing.
What it does
- Removes empty paragraph tags (including whitespace-only and
paragraphs) - Optionally disables WordPress
wpautopon content, excerpts, and text widgets - Gives you a Settings screen so you can choose exactly where cleanup runs
- Stays lightweight: front-end cleaning runs only where you enable it
Useful when
- Page builders or custom HTML layouts pick up extra vertical space
- Classic editor / mixed content leaves empty paragraphs behind
- You want
wpautopoff in some places, but normal paragraphs elsewhere
Default settings match older versions of this plugin, so existing sites keep the same behavior after upgrading.
Release Notes
Version 5.0.0 – Major update
This release rebuilds Empty P Tag around a proper settings experience while keeping the previous default behavior for existing sites.
Highlights
- New admin page at Settings Empty P Tag
- Turn WordPress automatic paragraphs (
wpautop) on or off for content, excerpts, and text widgets - Choose where empty paragraph cleanup should run
- Improved matching for empty paragraphs that contain only spaces,
, line breaks, or invisible characters - Option to also remove empty paragraphs that include HTML attributes (for example a class)
- Optional setting to collapse consecutive / stray line break tags
- Quick Settings link on the Plugins screen
- Translation-ready (text domain:
empty-p-tag) - Settings are removed cleanly on uninstall
- Compatibility updates: requires PHP 7.2+, tested up to WordPress 6.8
Upgrade notes
- After updating, review Settings Empty P Tag
- Defaults match the older always-on behavior, so most sites will look the same after upgrade
- If your theme needs normal WordPress paragraphs, disable the
wpautopoptions and leave empty-tag cleanup enabled
Installation
From the WordPress admin
- Go to Plugins Add New.
- Search for Empty P Tag.
- Click Install Now, then Activate.
- Open Settings Empty P Tag to review options.
Manual install
- Upload the
empty-p-tagfolder to/wp-content/plugins/. - Activate Empty P Tag from the Plugins screen.
- Configure options under Settings Empty P Tag.
FAQ
-
Will this change my posts immediately?
-
Yes on the front end. The plugin filters rendered content; it does not rewrite post content in the database.
-
Does this disable all paragraph formatting?
-
Only if those options stay enabled. You can turn off
wpautopremoval per area (content, excerpt, widgets) and still strip empty tags. -
I upgraded and my layout looks different
-
Open Settings Empty P Tag and restore the defaults, or disable only the option that conflicts with your theme.
-
Can developers customize cleanup?
-
Yes. Filters include
haq_empty_p_tag_should_cleanandhaq_empty_p_tag_cleaned_content.
Reviews
Contributors & Developers
“Empty P Tag” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Empty P Tag” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
5.0.0
- Major rewrite with a Settings screen (Settings Empty P Tag)
- Choose where to disable wpautop (content, excerpt, widgets)
- Choose where empty paragraph cleanup runs
- Stronger empty-tag matching (
, zero-width spaces, attribute-bearing empty paragraphs) - Optional collapse of extra
<br>tags - Plugin action link to Settings
- Translation-ready text domain
- Clean uninstall that removes stored settings
- Requires PHP 7.2+, tested with modern WordPress
4.1
- Internal maintenance release
3.0
- WordPress.org compatibility updates
2.0.1
- Third release
- Added feature to remove whitespace-only paragraph tags
1.0.1
- Second release
- Added
preg_replacecleanup for empty tags
1.0.0
- First release
- Basic plugin
