Empty P Tag

Empty P Tag

5/5 (7 ratings) 800 active installs Updated Aug 9, 2026

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 &nbsp; paragraphs)
  • Optionally disables WordPress wpautop on 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 wpautop off 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, &nbsp;, 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 wpautop options and leave empty-tag cleanup enabled