WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by bPlugins v1.1.5

Code Block

Create beautiful, highlighted, copy-ready code snippets in WordPress. Lightweight Gutenberg code snippets block plugin.

Code Block

The facts

Active installs
200+
Price
Free
Last updated
29 Aug 2026
Added
Apr 2025
Requires WP
6.5
Tested up to
WP 7.1
Requires PHP
7.4
Downloads
5,186

Our analysis

AI-assisted

Code Block is a WordPress plugin designed for displaying programming code snippets with syntax highlighting and a copy-to-clipboard feature. It integrates with the Gutenberg editor, allowing users to easily add clean and readable code examples to their posts and pages. This plugin is suitable for developers, technical writers, educators, and anyone else who publishes programming content on WordPress.

The plugin supports various programming languages, including PHP, JavaScript, Python, HTML, CSS, JSON, and SQL. It offers multiple visual themes and responsive layouts, ensuring that code snippets look good on all devices. Users can also embed snippets anywhere on their site using shortcodes, making it versatile for different types of content.

Best for: This plugin is best for developers and technical writers who need to share code snippets on their WordPress sites.

What it does well

  • Integrates with the Gutenberg editor
  • Supports multiple programming languages
  • Includes a one-click copy button for snippets
  • Offers customizable syntax themes
  • Responsive design for all devices

Where it falls short

  • Limited information on user ratings and active installs
  • No details on additional features in the free version

Verdict

Code Block provides a straightforward solution for displaying code snippets in WordPress. It is particularly useful for those creating technical content, though more information about user feedback would be beneficial.

From the developer

bPlugins's own description of Code Block, lightly tidied.

Turn plain code into beautifully highlighted, copy-ready snippets your readers will love – right inside the Gutenberg editor.

Code Snippets Block | Pricing | Support | Live Demos

What Is Code Snippets Block?

Code Snippets Block is a lightweight WordPress code block plugin for displaying programming code with syntax highlighting, copy-to-clipboard functionality, responsive layouts, and multiple visual themes.

Add clean and readable code examples to WordPress posts, pages, documentation, tutorials, developer portfolios, knowledge bases, and technical websites without writing custom code.

The plugin works directly with the WordPress Gutenberg Block Editor and supports popular programming languages including PHP, JavaScript, Python, HTML, CSS, JSON, and SQL.

Why Use Code Snippets Block?

Publishing code in a normal text editor can make technical content difficult to read and copy. Code Snippets Block turns your code into a structured, highlighted, and copy-ready code block.

It is useful for developers, technical writers, educators, bloggers, documentation creators, agencies, and anyone publishing programming content with WordPress.

Free Features

  • One-Click Copy Button: Readers copy the entire snippet to their clipboard in a single click, with customizable text/icon.
  • Multiple Syntax Themes: Choose from pre-styled themes (like Dark, Midnight, and Light) to match your website design.
  • Syntax Highlighting: Improve readability for all major languages – PHP, JavaScript, Python, HTML, CSS, and more.
  • Responsive Code Views: Snippets wrap and resize smoothly on mobile, tablet, and desktop.
  • Shortcode Support: Embed code snippets anywhere on your site.
  • Dedicated Block Category: All blocks are grouped under a “Code” category in the Gutenberg inserter for easy access.
  • Optimized & Lightweight: Assets load only when a block is on the page, with minimal impact on page speed.

Pro Version

Upgrade to Pro to unlock a suite of 16 interactive developer blocks:

  • Run Python (WASM): A live Python interpreter powered by Pyodide (WebAssembly) that runs in the reader’s browser – no server-side execution, lazy-loaded for speed.
  • Code Screencast (Self-Typing): Animated, character-by-character typing walkthroughs.
  • JSON Explorer: Interactive, collapsible, searchable JSON tree views with match-highlighting and copy-path tools.
  • Regex Tester: A live regular-expression sandbox with highlighted match output.
  • Spotlight Code: Walk readers through specific lines by dimming or blurring the rest, with captioned steps.
  • Code Snapshot: Turn snippets into mockup graphics with window chrome, gradients, and shadows – download as PNG or copy image.
  • API Try-It Console: A functional HTTP/REST client block for live requests with timing, status, and formatted responses.
  • Annotated Code: Clickable badges on specific lines that reveal detailed explanations.
  • AI Code Explainer: Generate plain-English explanations using OpenAI or Anthropic inside the editor.
  • Diagram as Code: Write Mermaid text and render flowcharts, sequence diagrams, class diagrams, Gantt charts, and pie charts.
  • Live Code Playground: An HTML/CSS/JS sandbox in a secure iframe with instant visual previews.
  • Code Diff / Comparison: Highlight added/removed lines in Unified or Split view.
  • Multi-Tab Code Switcher: Organize snippets under tabs (e.g. npm vs yarn, or JavaScript vs PHP).
  • Terminal / Command Line: A styled shell emulator with typing animations and one-click copy of commands.
  • Remote Code Embed: Fetch code from GitHub Gists, raw files, or CodePen pens, styled in your own theme.
  • Advanced Code Block Styling: Custom colors, font sizes, paddings, borders, shadows, alignment, and line numbering.

How to Use

  1. Install and activate the Code Snippets Block plugin.
  2. In the Gutenberg editor, add the Code Snippets block.
  3. Paste your code and pick a syntax theme.
  4. Adjust settings from the right-side settings sidebar.
  5. Publish – your highlighted, copy-ready snippet is live!

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for developer tooling.

WPCode

WPCode

93

Easily add code snippets in WordPress. Insert header & footer scripts, add PHP code snippets with conditio...

Free 3M+ installs 4.9★ (1,873)
Header Footer Code Manager

Easily add tracking code snippets, conversion pixels, or other scripts required by third party services for an...

Free 600k+ installs 4.9★ (309)
Admin and Site Enhancements

Duplicate post, post order, image resize, email via SMTP, admin menu editor, custom css / code, disable gutenb...

Free 200k+ installs 5★ (421)
Shortcoder

Create custom "Shortcodes" easily for HTML, JavaScript, CSS code snippets and use the shortcodes wit...

Free 100k+ installs 4.9★ (227)
Insert PHP Code Snippet

Add PHP code to your pages and posts easily using shortcodes.

Free 90k+ installs 4.9★ (705)
Code Snippets

An easy, clean, and simple way to enhance your site with code snippets.

Free 1M+ installs 4.7★ (509)