An easy to use 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 14 languages, 16 shortcodes and 36 themes. The syntax highlighting feature implemented via a CodeMirror library. If you want more options then tell me and I will be happy to add it.
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
- Live preview on Settings Page
- Standalone Shortcode-Processor
- Syntax highlighting (by CodeMirror)
- Line numbering
- 36 Themes
- 14 Languages
- 16 Shortcodes
- Allow shortcodes in the text widget
A list of supported languages:
Click to view language examples. Highlighted with Default theme.
A list of supported shortcodes:
A list of supported themes:
- 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.
- Upload “My Syntax Highlighter” to the
- Activate the plugin through the “Plugins” menu in WordPress.
- Go to “Settings” → “My 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.
This plugin is translate ready. But If your language is not available you can make one. The
.pot file is included and placed in “languages” folder. Many of plugin users would be delighted if you shared your translation with the community. Just send the translation files (
*.mo) to me at the firstname.lastname@example.org and I will include the translation within the next plugin update.
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.
Developing plugins is long and tedious work. If you benefit or enjoy this plugin please take the time to: