An easy to use, with intuitive interface, WordPress plugin that provides a simple way for embedding syntax-highlighted source code within pages or posts on your website, without losing it’s formatting or making any manual changes. Supporting 13 languages, 16 shortcodes and 36 themes. The syntax highlighting feature implemented via a CodeMirror library.
Syntax highlighting is a feature that displays source code, in different colors and fonts according to the category of terms. Syntax highlighting is one strategy to improve the readability and context of the text; especially for code that spans several pages. The reader can easily ignore large sections of comments or code, depending on what they are looking for.
This plugin also uses standalone Shortcode-Processor to prevent WordPress from converting newlines to HTML paragraphs, replacing apostrophes with typographic quotes and so on.
This plugin is just plug and play, no tedious configurations or hacks, just install, enable and start using your new shortcodes.
- Lightweight and fast
- Secure code with using clear coding standards
- Intuitive interface with many settings
- Cross browser compatible (work smooth in any modern browser)
- Compatible with all WordPress themes
- RTL compatible (right to left)
- Translation ready
- Published on WordPress.org
Key features include
- Standalone Shortcode-Processor
- Syntax highlighting (by CodeMirror)
- Line numbering
- Dollar sign before line
- 36 Themes
- 13 Languages
- 15 Shortcodes
- Allow shortcodes in the text widget
- And much, much more!
PRO features include
- 55 Themes (all provided themes from CodeMirror)
- 153 Languages (all provided languages from CodeMirror)
- 121 Shortcodes
- Programming language selection option
- Loading CodeMirror files on pages only when needed
- No ads on the settings page
- Well documented
A list of supported languages:
Click to view language examples. Highlighted with Default theme.
- PHP → see example
- XML → see example
- HTML → see example
- CSS → see example
- SCSS → see example
- LESS → see example
- SASS → see example
- MarkDown → see example
- Perl → see example
- SQL → see example
- MySQL → see example
- Shell → see example
A list of supported shortcodes:
- [code][/code] - customizable shortcode
A list of supported themes:
- 3024 day
- 3024 night
- Ambiance mobile
- Base16 dark
- Base16 light
- Erlang dark
- Lesser dark
- Paraiso dark
- Paraiso light
- Pastel on dark
- The matrix
- Tomorrow night bright
- Tomorrow night eighties
- Vibrant ink
- XQ dark
- XQ light
- Plugin settings page.
- Example of post with added source code and wrapped it in shortcode provided by this plugin. Default theme of highlighter.
- Example of post with added source code and wrapped it in shortcode provided by this plugin. The “The Matrix” theme of highlighter.
- Example of post with added source codes on multiple language and wrapped it in shortcode provided by this plugin. Default theme of highlighter.
This plugin is ready for translation and has already been translated into several languages.
If you want to help translate this plugin then please visit the translation page.
This plugin is open-sourced software licensed under the GNU General Public License, version 3 (GPLv3) and is distributed free of charge.
Commercial licensing (e.g. for projects that can’t use an open-source license) is available upon request.
- Upload “My Syntax Highlighter” to the
- Activate the plugin through the
Pluginsmenu in WordPress.
- Go to
Settings→ “Syntax Highlighter”.
Just switch to the Text/HTML editor and wrap your source code in one of the supported shortcodes (like
[code]...[/code] that is universal shortcode) and this plugin takes care of the rest. Example:
[code] This is an "example"! [/code]
In this case, the shortcode will prevent WordPress from inserting paragraph breaks between
an "example", as well as ensure that the double quotes around
example are not converted to typographic (curly) quotes.
To avoid problems, only edit posts that contain your source code in Text/HTML mode.
Developing plugins is long and tedious work. If you benefit or enjoy this plugin please take the time to: