sandywp / plugins / wp-coder

WP Coder

Insert & Manage Code Snippets

4.9 out of 5 stars. 4.9 32 reviews

Snippets made simple — easily insert and manage custom PHP, CSS, JS & HTML without coding in theme files.

Launch a sandbox with this plugin → No signup.
Ready in seconds.

v4.5.1 10,000+ installs WP 5.4+ PHP 7.4+

your-sandbox.sandywp.com/wp-admin
WP Coder – Insert & Manage Code Snippets running inside a SandyWP sandbox

What you get inside

8 screens
  • HTML Block – Easily insert custom HTML snippets.

  • CSS Block – Manage and insert custom CSS snippets.

  • JavaScript Block – Customize your site's functionality with JS snippets.

  • PHP Block – Dynamically embed PHP snippets.

  • Include External CSS & JS – Quickly link external CSS and JavaScript files.

  • Publish Settings – Configure snippet visibility and publishing options.

  • Snippets Manager – manage all snippets efficiently.

  • Tools – Access helpful tools like Tracking Code Manager and Google AdSense integration.

About this plugin

Tired of editing theme files to add custom scripts or styles?
WP Coder lets you insert custom HTML, CSS, JavaScript, and PHP snippets directly from your dashboard — no coding in theme files required. Gain full control and flexibility over your site.

Documentation | Upgrade to Pro

Why WP Coder?

  • All-in-One Code Editor: Tabbed editor for HTML, CSS, JS & PHP with CodeMirror syntax highlighting.
  • Gutenberg Block: Insert snippets directly in the block editor with live preview and custom attribute support.
  • Shortcode Integration: Use [wp_code id="X"] to embed snippets anywhere.
  • Live Preview: Instantly preview HTML & CSS without reloads in both the backend and Gutenberg.
  • Performance Ready: Minify CSS/JS, obfuscate JavaScript, and control script loading with async / defer.

Ideal For

  • Developers: Test snippets, hooks, and debug quickly.
  • Marketers: Insert tracking pixels, analytics, and ad scripts.
  • Designers & Bloggers: Customize layouts, styles, and enhance engagement.

Key Features

  • Insert HTML, CSS, JS, and PHP via powerful shortcodes.
  • Smart PHP handling: run in admin, front-end, everywhere, or only where inserted.
  • Include external libraries (Google Fonts, CDN scripts & styles).
  • Test Mode: Preview snippets safely before going live.
  • Import/Export snippets and settings between sites.
  • JavaScript Obfuscation: Protect your scripts with Dean Edwards’ Packer.
  • Customizable Interface: Hide unused editor tabs (HTML, CSS, JS, etc.) for a cleaner workflow.
  • NAV comments: Add inline navigation markers for faster code editing.
  • Lightweight & secure — built for performance.

Included Tools:

Integrations

  • Google Tag Manager (GTM) integration with user role controls.
  • Google Analytics, Facebook Pixel, and Pinterest Pixel integration.
  • Google AdSense integration with the option to disable ads for selected user roles.

Content & Templates

  • Markdown Editor – Disables Gutenberg and TinyMCE, replacing them with a Markdown editor powered by CodeMirror.

Developer Tools

  • Debug Log management (enable/disable and clear log).
  • Show Page Debug Info – Display technical info for the current request in the Admin Bar (template, query type, object, body classes). Admins only.
  • Theme Switcher – Quickly switch between installed themes directly from the admin bar.

Included Snippets:

Editor & Content

  • Disable Gutenberg Editor
  • Remove Gutenberg Block CSS
  • Disable Widget Blocks
  • Enable Shortcode Execution in Widgets
  • Enable Excerpt for Pages
  • Open External Links in New Tabs
  • Change “Read More” Text

Admin Interface Tweaks

  • Disable Screen Options Tab
  • Disable Welcome Panel
  • Duplicate Posts
  • Disable Admin Bar

Login & User Access

  • Disable Login Page Language Switcher
  • Disable Login by Email
  • Disable Admin Password Reset Emails
  • Custom Login Logo
  • Custom Login Redirect URLs
  • Change Redirect After Login
  • Change Redirect After Logout

Media & Embeds

  • Enable SVG Upload
  • Force Lowercase Filenames
  • Default ALT Text for Avatars
  • Enable/Disable Lazy Load
  • Disable Embeds
  • Adjust oEmbed Max Dimensions

Core Functionality

  • Disable XML-RPC
  • Disable REST API
  • Disable Automatic Updates
  • Disable Automatic Updates Emails
  • Disable Emojis
  • Disable Shortlinks
  • Limit Post Revisions

Comments & Feedback

  • Disable Comments Globally
  • Disable Comment URL Field
  • Disable Self Pingbacks
  • Disable Trackbacks & Pingbacks
  • Disable HTML in Comments
  • Limit Comment Length

Cleanup & Optimization

  • Remove WP Version
  • Disable Attachment Pages
  • Disable RSS Feeds
  • Disable Built-in Search
  • Disable wlwmanifest Link
  • Disable Automatic Trash Emptying
  • Redirect 404 to Homepage

WP Coder simplifies your WordPress development workflow and makes customization safe, fast, and flexible!

Get started today and simplify your WordPress development workflow with WP Coder!

Quick Start Video

Plugin Demo:

Support

Need help? Ask questions and get quick answers in our support center.

Questions

Does WP Coder support Network activation?

Currently, WP Coder doesn’t support network-wide activation. If you’re using WordPress Multisite, activate the plugin individually on each site within your network.

Where can I find detailed documentation?

Visit our comprehensive official documentation for detailed guides and step-by-step instructions.

How can I use shortcode content in HTML code?

If you include content within the shortcode like [wp_code id="1"]Some Text[/wp_code], you can insert this content into your HTML snippet using the variable {{$shortcode_content}}.

Can I use shortcodes from other plugins within WP Coder snippets?

Absolutely! WP Coder allows you to embed shortcodes from any plugin within your HTML snippet content. You can also use WP Coder’s own shortcodes, offering enhanced flexibility for customization.

What is the purpose of tags in the ‘Publish’ block?

Tags help categorize and organize your snippets. When creating or editing a snippet, assign tags in the ‘Publish’ block to easily filter and manage your snippets later.

How do I use the link feature in the ‘Publish’ block?

The link feature helps you track where your shortcode is placed. Simply enter the URL of the page where your shortcode is inserted in the ‘Link’ field when creating or editing your snippet.

4.9

32 reviews

  • 5 ★ 31
  • 4 ★ 0
  • 3 ★ 0
  • 2 ★ 0
  • 1 ★ 1

Ratings come from WordPress.org. SandyWP does not collect its own reviews.

sandywp / also on the shelf

Try another plugin

Spin up a real WordPress site in seconds.

Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.