HTML Code

A quick guide about the block “HTML Code” and its options.

HTML Code screenshot

The WP Coder plugin comes with a powerful HTML Code feature, providing you with a simple and efficient way to add custom HTML code to your WordPress site.

With this feature, you can embed custom HTML anywhere on your website, giving you the flexibility to tailor your pages exactly how you wish. Whether you’re looking to add a personalized form, a unique navigation bar, or any other HTML-based element, the HTML Code feature can help you do that seamlessly.

Using the HTML Code is straightforward. After you’ve activated the WP Coder plugin, simply navigate to the WP Coder settings in your WordPress dashboard. There, you’ll find an HTML code editor where you can write or paste your custom HTML. Once done, save your changes and use the provided shortcode to insert your custom HTML block anywhere on your site – in pages, posts, or widgets.

✨ HTML Code Features

Live Preview

Instantly preview your HTML and CSS output directly inside the editor.

  • Built-in preview window
  • Automatically updates when code changes
  • Perfect for testing layouts without reloading the page

Add Image Button

Quickly insert images into your HTML code.

  • Opens the WordPress Media Library for image selection
  • Automatically generates the <img> tag with src attribute
  • Supports alt text and custom attributes for accessibility

Minified

Optimize the HTML output before rendering.

  • Removes extra spaces and line breaks
  • Reduces file size for better performance
  • Recommended for production use

Allow PHP in HTML PRO

Enable PHP execution inside your HTML code.

  • Use <?php ... ?> within your HTML snippets
  • Great for generating dynamic content
  • ⚠️ Warning: may be unsafe if code contains errors or vulnerabilities. Use only if you understand the risks

Add NAV Comment Button

Create navigation anchors in your code for quick access.

  • Adds a special comment <!-- NAV: Block Name -->
  • The editor automatically generates a navigation menu based on these comments
  • Makes it easy to jump between sections in large code files
Please note that, as with any custom code, you should always double-check your HTML for any potential errors before adding it to your site, as incorrect code could potentially disrupt your site’s layout or functionality.
Please provide only the inner HTML content, excluding the <html> and <body> tags. The page already contains these tags, and your code will be inserted within the <body> tag directly.