Free · Data, charts and tables
Code block for WordPress
A code listing with syntax highlighting, line numbers and a copy button. Stays readable if the plugin is ever turned off.
Live
The Code block, working
This is the block itself, running on this page with sample content. Nothing here is a picture.
<?php
function greet( string $name ): string {
return "Hello, " . $name;
}What you can change
- Line numbers (on or off)
- Copy (on or off)
- Wrap (on or off)
Also known as: code, syntax, highlight, snippet, programming.
Good to know
Questions about the Code block
Is the Code block free?
Yes. The Code block is in the free Page Builder Sandwich plugin, with no time limit and no account to create.
Does the Code block work with my theme?
Yes. It is an ordinary WordPress block, so it works with any theme, in the block editor and in Sandwich Studio. Its styles load only on the pages that use it, so the rest of your site stays as fast as it was.
Can I try the Code block before I install anything?
Yes. Open the live editor: your own copy of a demo page with Page Builder Sandwich and Page Builder Sandwich Pro, no sign-up, gone within the hour.
More blocks in Data, charts and tables
- Chart (Pro)
- Data table (Pro)
- Events (Pro)
- Google and Trustpilot reviews (Pro)
- Org chart (Pro)
- Progress bar (Free)
- Progress circle (Pro)
- Query loop (Pro)
- Roadmap (Pro)
- Star rating (Free)