Alox Code+
A free WordPress plugin to beautify your code with Prism.js
v1.0.0 • GPL-2.0+ Licensed • ~5KB zipped
Alox Code+
A WordPress plugin to beautify your code
What It Does
The Alox Code+ Free Wordpress plugin transforms the default WordPress Gutenberg code block into a clean, developer-friendly UI with syntax highlighting, language badges, and instant one-click copy.
It’s designed for dev blogs, documentation sites, and technical writers who want a better way to present code in WordPress.
Features
With zero configuration required, it automatically detects the language from the block’s language-xxx class, loads Prism.js components only when needed, and ensures blazing-fast performance by deferring scripts.
- Prism.js syntax highlighting
- Auto language detection via
language-xxx - Easy Copy/Paste button (with fallback)
- Language badge and floating toolbar
- Dark mode compatible
- Filters to customize Prism CDN, theme, and languages
How To Use
To install Alox Code+, upload the plugin to your WordPress site directory /wp-content/plugins/ or simply use the “Upload Plugin” button in your WordPress admin: Plugins > Add Plugin > Upload Plugin
Activate the plugin and you're done!
Now, in any post or page, simply insert the default WordPress Gutenberg Code block where you want to show code.
To enable syntax highlighting and language-specific colors, add the appropriate CSS class to your code block:
language-markup(default and same as HTML)language-htmllanguage-phplanguage-javascriptlanguage-csslanguage-bashlanguage-jsonlanguage-sqllanguage-clike
Images
Click a thumbnail to view the full size.
Developer Customization
Alox Code+ is built for developers who like control. Override filters to load only the languages you need, point to a custom Prism theme or CDN, and tailor badges or copy buttons to your brand. Lightweight, cache-friendly, and dark-mode aware, it drops cleanly into any WordPress stack. No build step required.
Easily tweak supported languages and theme:
// Modify languages loaded by Prism
add_filter('alox_code_plus_languages', function($langs) {
return ['php', 'javascript', 'css', 'html'];
});
// Change Prism theme URL
add_filter('alox_code_plus_prism_theme_url', function($url) {
return 'https://cdn.example.com/my-custom-prism-theme.css';
});
// Change Prism CDN base
add_filter('alox_code_plus_prism_cdn', function($cdn) {
return 'https://cdn.example.com/prism/';
});
Credits
Alox Code+ builds on the excellent Prism.js ecosystem. Explore docs, themes, plugins, and CDNs below.
- Prism.js official site
- Prism.js on GitHub
- Prism Themes
- Custom build and plugins
- Supported languages
- CDN: jsDelivr • cdnjs • unpkg
Prism.js is MIT licensed. Alox Code+ is GPL-2.0+. Please review and respect each license.