WordPress plugin

Raw HTML Pro

WordPress formatting can turn newlines into paragraphs, change straight quotation marks to typographic quotes, add image smilies, or convert characters. Wrap selected content in [raw]...[/raw] tags to keep these changes from altering the protected code.

Raw HTML Pro

Protect code while editing WordPress posts

WordPress formatting can turn newlines into paragraphs, change straight quotation marks to typographic quotes, add image smilies, or convert characters. Wrap selected content in [raw]...[/raw] tags to keep these changes from altering the protected code.

In Visual mode, Raw HTML Pro shows protected content as a read-only placeholder. Edit the original in Text/HTML mode; it is restored when you switch back to HTML and when the post is displayed to readers. A second tag format works in the same way, but its content is not visible to visitors if Raw HTML is deactivated.

Choose formatting filters for a post

Checkboxes on the Edit Post screen let you disable selected WordPress filters per post:

  • wptexturize creates smart quotes and other typographic characters.
  • Automatic paragraph creation turns newlines into paragraphs.
  • Image smilies add smilies from text.
  • convert_chars converts ampersands to HTML entities and adjusts some Unicode characters.

Some Raw HTML features require the unfiltered_html capability. On a standard WordPress installation, Editors and Administrators have this capability. On Multisite, it is available by default only to the Super Admin.

Set shortcode and excerpt behavior

Shortcodes inside raw blocks appear as plain text by default. To let them run, add shortcodes=1 to the tag, as in [raw shortcodes=1].

Automatically generated excerpts omit raw blocks by default. To keep them in excerpts, add the RAW_HTML_KEEP_RAW_IN_EXCERPTS definition to wp-config.php.

Editor support

Raw HTML does not fully support Gutenberg. Since WordPress 5.0, some features work only with the Classic Editor plugin. For posts with custom code, the documented workflow is to edit in Text/HTML mode; the Pro version includes read-only placeholders when Visual editing is needed.

Using Raw HTML Pro

Add Raw HTML Pro to WordPress and open a post or page in an available editor. Wrap the code to protect in raw tags, pick any per-post filter settings you need, then save. Edit protected code in Text/HTML mode; in Visual mode, the placeholder helps prevent accidental changes.