WordPress article code snippet display and syntax hightlighting

A very common use in writing about programming and webdevelopment is the presentation of code itself. In this article a small test of options to display and share code inside wordpres articles or plain html markup.

Online frontend code editors like jsfiddle.net, codepen.io, jsbin.com, stackblitz.com, repl.it and jsitor.com and beyond frontend ide’s like codesandbox.io, ideone.com or michaelsboost.com/kodeWeave are awesome to prepare code snippets in multiple ways. Besides being able to prepare and adjust your code for publication, most editors provide embed options to present the code directly on other web platforms.

One of my favourites is jsfiddle.net’s iframe embed:

Particulairy for this WordPress environment i’m now using the Urvanov syntax highlighter to present code in different styles like this:

Or this

and the SyntaxHighlighter Evolved plugin to present code like this:

[crayon-61b1369db590d544719229/]

Furthermore i’m still testing Crayon Syntax Highlighter, Enlighter – Customizable Syntax Highlighter, WP-Syntax and iG:Syntax Hiliter, some of which must be pretty straight forward and worth to check out.

Code pasting with many different coding situations and a lot of languages recognized to present correct highlighting is now easily done. After a while, professionally progressively using and researching the real value of these plugins above they might be added to the wp-most-used-plugins repository and this article will be updated with the latest findings.

Leave a comment

Your email address will not be published. Required fields are marked *