Skip to main content
Agency Program Hosting from 10% off. A dedicated account manager. Priority support. Built for growing agencies. Hosting from 10% off, a dedicated account manager and priority support for growing agencies. Speak to the team Join free
WP Coder – Powerful HTML, CSS & JS Injection icon

WP Coder – Powerful HTML, CSS & JS Injection

v5.0.2
by Wow-Company · 4.9 (32 reviews)

WP Coder: A profound WordPress plugin for directly incorporating custom HTML, CSS, and JavaScript codes into your WordPress pages.

10K+ active installs Updated Nov 16, 2026 Tested to 7.1.5 Requires PHP 7.4
Try Demo Download
Pre-installed Ready in ~10s No card
WP Coder – Powerful HTML, CSS & JS Injection

About WP Coder – Powerful HTML, CSS & JS Injection

WP Coder is a plugin for WordPress that allows you to easily embed HTML, JS, CSS, and PHP codes into your website. It is a powerful tool for customizing your website's design and adding interactive features. The plugin also includes additional tools and snippets for further customization.

Screenshots

WP Coder – Powerful HTML, CSS & JS Injection screenshot
WP Coder – Powerful HTML, CSS & JS Injection screenshot
WP Coder – Powerful HTML, CSS & JS Injection screenshot
WP Coder – Powerful HTML, CSS & JS Injection screenshot
WP Coder – Powerful HTML, CSS & JS Injection screenshot
WP Coder – Powerful HTML, CSS & JS Injection screenshot
WP Coder – Powerful HTML, CSS & JS Injection screenshot
WP Coder – Powerful HTML, CSS & JS Injection screenshot
WP Coder – Powerful HTML, CSS & JS Injection screenshot
WP Coder – Powerful HTML, CSS & JS Injection screenshot

Frequently asked questions

What types of code can WP Coder embed?
WP Coder can embed HTML, JS, CSS, and PHP codes directly into your WordPress pages.
What are some key features of WP Coder?
Key features include direct code injection, PHP Global, Test Mode, Import/Export Functions, and a multifunctional code editor. It also offers advanced CSS and JS options, and integration of external libraries.
How does WP Coder help optimize website performance?
WP Coder allows you to embed various scripts and styles without needing multiple plugins, which can help avoid site performance degradation. It also offers options to have CSS and JavaScript inline or minified to optimize page loading times.
Can I test code changes before they go live?
Yes, WP Coder includes a Test Mode feature that allows you to test different codes without affecting your live site.
Does WP Coder support external libraries?
Yes, WP Coder allows you to integrate external libraries, leveraging existing scripts or styles to optimize site development.

Changelog

5.0.2

  • Added: Safe Mode switches off a snippet – or Global PHP – whose PHP stops the site with an error no code can catch (time limit, memory exhausted, “Cannot redeclare”), so the next page loads, and leaves an admin notice linking to it. Until now every page kept failing until Safe Mode was set by hand.
  • Added: Tracking Code Manager – switch off Google Analytics and the Facebook and Pinterest pixels for chosen user roles, as already possible for Tag Manager and AdSense.
  • Fixed: PHP code set to “Run only in admin area”, “Run only on front-end” or “Run everywhere” also ran where the snippet’s shortcode or block was placed – a second time on that page, so a function or class it declared stopped the page with “Cannot redeclare”, and admin-only code ran on the front end. It now runs only where Include PHP says; “Run where inserted” works as before.
  • Fixed: Test Mode also holds back PHP code set to “Run only in admin area”, “Run only on front-end” or “Run everywhere”: it ran for every visitor, and now runs for administrators only, like the rest of the snippet.
  • Fixed: The tooltip of the Status column in All Codes, and the “Delete” bulk action label.

5.0.1

  • Fixed: Security – the alt text of a media library image is now escaped in {{name_alt}} (and {{name_srcset}}, {{name_sizes}}) of an Image attribute. A user who can upload media (Author and above) could set an image’s Alt Text so that it broke out of alt=”{{name_alt}}” in an administrator’s snippet and ran a script for every visitor of the page. An image URL can no longer close a single-quoted attribute either. Reported through Wordfence.
  • Fixed: Security – “Duplicate Posts & Pages” copies only posts the user can edit, and each Duplicate link works for its own post only. A Contributor could copy any post – someone else’s private post or draft, with its password and custom fields – into a draft of their own.
  • Fixed: Security – “Open External Links in New Tab” could turn a link written by a Contributor into a script on the page (WordPress before 7.0 keeps the quotes that made it possible). Links are now edited through WordPress’s HTML API; on WordPress older than 6.2 they are left as written.
  • Fixed: Security – values from an author who may not publish raw HTML (e.g. a Contributor) can no longer close the HTML attribute of the snippet they are placed in: shortcode and block attributes, HTML and Rich text ones included, and the content between [wp_code]…[/wp_code] ({{$shortcode_content}}). Inside a tag their quotes are encoded, and outside quotes their spaces too; the page shows the same text. Values from administrators are written as before.
  • Fixed: Security – “Allow SVG Uploads” also cleans a file sent to the REST API as the raw request body, and removes links under any xlink prefix and instructions.

5.0

  • Added: Snippets – the full set from WP Coder Pro, now 82 snippets in 8 groups, with a new Security group and instant search across all of them. Your existing snippet settings are kept; the few renamed options are migrated automatically.
  • Added: Code editor – code folding, highlighting of matching words, Ctrl/Cmd+S to save, find & replace, select next occurrence, go to line, full screen (F11), a shortcuts reference, and a warning before leaving with unsaved code.
  • Added: Display Everywhere – a snippet can now be added to every page automatically, without a shortcode, at the Location you choose: in , after opens, before or after the post content, or before . Ideal for analytics, verification meta tags and site-wide scripts. Existing snippets stay shortcode-only until you change this on the Conditions tab.
  • Added: Attributes – define values each shortcode or block fills in, used in the code as {{name}}. Types: text, textarea, number, range, URL, image, color and date; the block shows a matching field for each. An image attribute also gives {{name_url}}, {{name_alt}}, {{name_srcset}}, {{name_html}} and more. Attributes from WP Coder Pro keep working.
  • Added: Several tags per snippet – separate them with a comma; each tag in the list is its own filter link, and export by tag includes every snippet carrying it. Existing tags are kept.
  • Added: Pin snippets – keep the ones you return to at the top of the list, with a pin icon on each row and Pin/Unpin bulk actions.
  • Added: Snippet note – a private note under the Link field of the snippet editor, shown under the title in All Codes; it is never printed on the site.
  • Added: Snippets & Tools settings export / import – on the Import / Export page, download which Snippets and Tools items are switched on, with their options, and import the file on another site. It replaces those settings on the receiving site; files move between WP Coder and WP Coder Pro.
  • Added: Descriptions of WP Coder Pro features on the Attributes and Conditions tabs and on the Tools page.
  • Improved: Conditions tab – Display (Shortcode or block only / Everywhere) is now set here, in the same place as in WP Coder Pro, with Pro’s page rules listed greyed out in the same menu. Location moved there too, right under Display, and appears when Display is Everywhere.
  • Improved: Admin interface restyled to match WP Coder Pro.
  • Improved: “Disable Gutenberg Editor” can keep the block editor on chosen post IDs; “Disable REST API” can apply to logged-out visitors only.
  • Improved: “Redirect 404 to Homepage” now uses a temporary (302) redirect, so a page published at that URL later still works.
  • Improved: Activating WP Coder deactivates WP Coder Pro wherever it is installed, and a notice says so; your snippets and settings, Pro’s included, are kept for when Pro is active again.
  • Improved: A <?php pasted at the start of Global PHP or of a snippet’s PHP code is removed on save – the file already starts with it, and a second one stopped all of the code from running.
  • Changed: Security – PHP code is checked before it runs, as in WP Coder Pro: a snippet’s PHP, an included PHP snippet or Global PHP that calls eval(), exec(), system(), shell_exec(), passthru(), popen(), proc_open(), pcntl_exec(), assert(), create_function() or base64_decode(), or uses backticks, is not run. Its HTML still shows, and the block is written to the debug log (for Global PHP and included snippets, also shown as an admin notice). If your code uses one of these functions, it stops running after this update.
  • Changed: Plugin Switcher moved to WP Coder Pro.
  • Fixed: Security – Safe Mode (?wpcoder-safe-mode=1) now works for administrators only. Any visitor could add it to a URL and switch off Global PHP and included PHP snippets for their own request. If even the login screen fails, add define( 'WPCODER_SAFE_MODE', true ); to wp-config.php instead, and remove it once the snippet is fixed.
  • Fixed: Safe Mode now also skips the PHP code of snippets shown on the page, so a broken snippet can no longer take down the page you open to fix it.
  • Fixed: What a snippet’s PHP code prints now appears where the shortcode or block stands, not above the post content.
  • Fixed: An attribute holding HTML (e.g. Rich text, from WP Coder Pro) used inside an HTML attribute of the snippet – title=”{{name}}”, alt=”{{name}}” – no longer breaks the rest of the page in a block.
  • Fixed: Editing a snippet created in WP Coder Pro (or imported from it) erased its attributes, display rules and conditions; they are now kept for when Pro is active again.
  • Fixed: Shortcode and block attribute values are escaped when the post’s author may not publish raw HTML (e.g. a Contributor), and a “]” in a block attribute no longer cuts the snippet short.
  • Fixed: The WP Coder block preview in the editor now shows the snippet’s CSS (the editor content is in an iframe, and the styles were added outside it).
  • Fixed: The “title” and “id” values of a shortcode reached {{title}} / {{id}} unescaped when the post’s author may not publish raw HTML.
  • Fixed: Clearing a snippet’s PHP code did not stop it – with “Run everywhere / admin / frontend” selected, the old code kept running on every request. Files left over from earlier saves are cleaned up on update.
  • Fixed: “Inline” CSS broke child selectors (“.card > .title” was written as “>”).
  • Fixed: Deleting a snippet now also deletes its CSS, JS and PHP files.
  • Fixed: A CSS or JS file recreated after the uploads folder was cleared ignored the Minify/Obfuscate setting.
  • Fixed: SVG uploads are sanitized – scripts, event handlers and javascript: links are removed, and a file that is not valid SVG is rejected.
  • Fixed: A PHP error in a snippet no longer breaks the whole page; the snippet’s output is skipped and the error is logged.
  • Fixed: A placeholder such as {{name}} that refers to an array no longer causes a fatal error on PHP 8.
  • Fixed: HTML minification no longer joins words separated by a line break, and leaves

<

pre>,

4.5.2

  • Fixed: Security – the WP Coder admin pages and all save handlers (Global PHP, snippets with PHP code, tools, import/export, debug log) are now restricted to administrators (manage_options together with unfiltered_html). Previously, users with the Editor role on single-site installs could save and execute arbitrary PHP. Thanks to Ayush Srivastava for responsibly reporting this issue.

4.5.1

  • Fixed: Security – restricted the Gutenberg block REST endpoints (snippet preview and attributes) to logged-in users with the edit_posts capability, preventing unauthenticated access.

4.5

  • Added: Lazy load option for images
  • Added: Google Tag Manager integration in Tools & Integrations
  • Fixed: Snippet Open External Links in New Tab now correctly identifies internal links

4.4

  • Added: Gutenberg block – insert and manage WP Coder snippets directly inside the WordPress block editor with live preview.

4.3.1

  • Fixed: includes css to Live preview

4.3

  • Added: Markdown Editor in Tools for writing with Markdown syntax.
  • Added: Debug Tools section in Tools, including:
    • Show Page Debug Info
    • Theme Switcher
    • Plugin Switcher
  • Improved: Tools page layout – tools are now grouped into sections for easier navigation.

4.2

  • Added: Debug Log page in WP Coder admin menu with options to enable/disable logging and clear log.
  • Added: Admin bar indicator with link to Debug Log when entries are present.

4.1

  • Added: Export snippets by tags
  • Added: Export selected snippets
  • Added: Option to use CSS files only in Live Preview without loading them on the site

4.0.3

  • Added: duplicate button for each item
  • Improved: Live Preview block behavior and rendering

4.0.2

  • Improved: Reorganized method order in DBManager class for better readability and maintenance
  • Improved: Minor SQL formatting for consistency
  • Cleaned: Minor code style improvements according to WordPress Coding Standards (WPCS)

4.0.1

  • Improved: Added matchBrackets: true option for the JavaScript editor to highlight matching brackets when editing code.

4.0

  • Improved: Refreshed interface for better user experience.
  • Added: “Open External Links in New Tab” snippet.
  • Added: “Redirect 404 to Homepage” snippet.
  • Added: “Limit Comment Length” snippet.
  • Added: “Disable HTML in Comments” snippet.
  • Added: “Disable Trackbacks & Pingbacks” snippet.
  • Added: Live preview feature for HTML & CSS snippets.

3.6.1

  • Fixed: Security issue in escaping within list files.

3.6

  • Added: Custom locations for PHP snippet inclusion.
  • Added: Option to hide tabs in settings.
  • Fixed: Admin style compatibility for Safari browser.

3.5.2

  • Fixed: Minor admin style improvements.
  • Fixed: Various minor bugs.

3.5.1

  • Changed: Adjusted user permissions to use the plugin.

3.5

  • Added: “Tracking Code Manager” tool for easy integration of analytics pixels.
  • Added: “Google AdSense” integration tool.
  • Added: User roles support for “Disable WP Admin Bar” snippet.
  • Improved: Updated back-link functionality.

3.4

  • Added: Pre-set popular snippets page.

3.3

  • Added: Button to insert images in HTML snippets.
  • Added: HTML Minification tool.
  • Improved: Enhanced CSS Minification tool.

3.2.1

  • Fixed: Minor database issue.

3.2

  • Added: “Add New” and “All Codes” buttons in editor.
  • Fixed: Improved admin styling.

3.1.1

  • Fixed: Database save issue.

3.1

  • Added: Global PHP snippet feature.
  • Added: Content handling inside shortcodes.
  • Added: Copy shortcode button.
  • Improved: More flexible file inclusion management.
  • Changed: Shortcode updated to [wp_code].

3.0.5

  • Fixed: Minor update bug and admin notifications.

3.0.4

  • Fixed: Updated datatable handling.

3.0.3

  • Fixed: Inline scripts/styles management.

3.0.2

  • Fixed: Execution order for scripts and styles.

3.0.1

  • Fixed: Updating and saving snippets.
  • Fixed: Admin capability adjustments.

3.0

  • Added: Test Mode and snippet Status.
  • Added: Tagging and Link options.
  • Added: Inline and Minified options for CSS.
  • Added: JavaScript optimization options.
  • Added: Export/Import feature.
  • Improved: Updated database and admin interface.

Changelog of earlier versions

Try other plugins