Beskrivelse
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
Why Code Snippets Block?
Code Snippets Block is a lightweight Gutenberg plugin that displays programming code in WordPress with syntax highlighting, copy-to-clipboard functionality, and customizable themes. Whether you’re sharing PHP, JavaScript, Python, HTML, CSS, JSON, or SQL, your snippets stay readable, consistent, and easy to copy with a single click.
Perfect for developers, educators, technical writers, and bloggers, it makes code examples, developer documentation, programming tutorials, and technical guides look clean and professional – with pre-styled themes to match your site’s design.
Built specifically for WordPress and Gutenberg, the plugin is responsive, SEO-friendly, and loads its optimized assets only when a block is on the page, keeping your site lightning-fast.
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
- Install and activate the Code Snippets Block plugin.
- In the Gutenberg editor, add the Code Snippets block.
- Paste your code and pick a syntax theme.
- Adjust settings from the right-side settings sidebar.
- Publish – your highlighted, copy-ready snippet is live!
Use Cases
- Programming Tutorials: Make your snippets easy to read and copy.
- Developer Documentation: Keep code examples clean and consistent.
- Developer Portfolios: Showcase your clean code with pride.
- Technical Knowledge Bases: Present reference code in a professional format.
- Educational Coding Resources: Help students follow along and copy examples.
Liked this plugin? Want a new feature? Send us some feedback.
⭐ Check out the Parent Plugin of this plugin-
🔥 b Blocks – Best gutenberg blocks collections for WordPress.
⭐ Check out our other WordPress Plugins-
🔥 Html5 Audio Player – Best audio player plugin for WordPress.
🔥 Html5 Video Player – Best video player plugin for WordPress.
🔥 PDF Poster – A fully-featured PDF Viewer Plugin for WordPress.
🔥 StreamCast – A fully-featured Radio Player Plugin for WordPress.
🔥 3D Viewer – Display interactive 3D models on the webs.
Skærmbilleder
Blokke
Dette plugin giver 1 blok.
- Code The Code Snippets block plugin lets you easily copy, style, and view beautifully highlighted code.
Installation
From your WordPress dashboard (recommended):
- Go to Plugins Add New.
- Search for “Code Snippets Block”.
- Click Install Now, then Activate.
- Add the Code Snippets block to any post or page in the Gutenberg editor.
Manual installation:
- Download the Code Snippets Block plugin (.zip file).
- In your admin area, go to Plugins Add New and click Upload Plugin.
- Choose the
code-snippets-block.zipfile and click Install Now. - Activate the plugin through the Plugins menu in WordPress.
FAQ
-
Is Code Snippets Block free?
-
Yes, Code Snippets Block is a free Gutenberg block plugin. A Pro version with 16 additional developer blocks is also available.
-
Does it work with any WordPress theme?
-
Yes, it will work with any standard WordPress theme.
-
Which programming languages does it support?
-
The block highlights all major languages, including PHP, JavaScript, Python, HTML, CSS, JSON, and SQL.
-
Can visitors copy the code from my site?
-
Yes. Every snippet includes a one-click copy-to-clipboard button, and you can customize its text or icon.
-
Can I change the look of the code block?
-
Yes. Choose from multiple built-in color themes and change block settings from the Gutenberg editor’s right sidebar.
-
Will this plugin slow down my site?
-
No. The plugin is lightweight and its optimized assets load only on pages where a block is actually used.
-
How many times can I reuse the block?
-
You can use the block an unlimited number of times.
-
Where can I get support?
-
You can post your questions on the support forum here.
Anmeldelser
Der er ingen anmeldelser for denne widget.
Bidragsydere & udviklere
“Code Block – share beautiful code snippets readers can copy” er open source-software. Følgende personer har bidraget til dette plugin.
BidragsydereOversæt “Code Block – share beautiful code snippets readers can copy” til dit eget sprog.
Interesseret i udvikling?
Gennemse koden, tjek SVN repository, eller abonner på udviklerloggen via RSS.
Ændringslog
1.1.5 – 13 July, 2026
- Fixed plugin editor page install issue.
- Some Assets optimization and performance issue fixed.
1.1.4 – 12 July, 2026
- Added dynamic assets loading.
- Fixed assets loading issues.
1.1.3 – 5 July, 2026
- Updated all code blocks.
- Fixed plugin register issue.
1.1.2 – 29 June, 2026
- Updated Dashboard for showcase blocks
- Run Python (WASM) block and JSON Explorer block responsive issues fixed
1.1.0 – 23 June, 2026
- Added new 16 blocks – Run Python (WASM), Code Screencast (Self-Typing), JSON Explorer, Regex Tester, Spotlight Code, Code Snapshot, API Try-It Console, Annotated Code, AI Code Explainer, Diagram as Code, Live Code Playground, Code Diff / Comparison, Multi-Tab Code Switcher, Terminal / Command Line, Remote Code Embed.
- Plugin title change and updated block title
- Updated Dashboard for showcase blocks
- performance issue fixed
1.0.3 – 14 Oct, 2025
- remove extra double
1.0.2 – 27 April, 2025
- border issues fixed;
- Plugin title change, block title change and some assets updated
1.0.1 – 22 April, 2025
- Some issues fixed;
- assets added;
1.0.0
- Initial Release
















