Syntax highlighting for many languages. Simple usage. Based on GeSHi, an established and rock-solid highlight engine. Valid HTML output.
• Go, have a look at the live demo.
• Plugin highlights:
WP-GeSHi-Highlight works as a drop-in replacement for WP-Syntax, which does not seem to be maintained anymore. Make the switch, it should just work (let me know how it went)!
Bear in mind: do not use the visual post editor. Use the raw editor instead. There, insert code blocks as canonical
pre blocks, and use the
lang argument to define the language of the code snippet:
<pre lang="languagestring"> CODE </pre>
A short example for the
<pre lang="bash"> $ dd if=/dev/zero of=image.ext3 bs=1M count=10000 oflag=append conv=notrunc </pre>
This is all you need to do. Right, it is that simple! Isn't that cool?
Many websites have used this plugin for years, and it seems to serve its purpose very well. Most issues so far were style-related. If you find an issue, please let me know: drop a mail or leave a comment.
• Theme compatibility of the default style sheet:
The default style sheet was tested with recent versions of all official themes (Twenty Ten to Twenty Fifteen), and with a large range of non-official themes such as Vantage, Customizr, ColorWay, Zerif Lite, Responsive, Storefront, Virtue, evolve, Make, Sparkling, Spacious, Enigma, Sydney, Point, Interface, SinglePage.
Certain themes might define styles with a high specificity that negatively affect the visual code block appearance. It is difficult to impossible to anticipate all these cases in advance, so I expect this to happen in rare cases (the past has proven that these things happen). So, I need you to look out for these situations, and please report them!
Requires: 3.0 or higher
Compatible up to: 4.2.11
Last Updated: 2 years ago
Active Installs: 1,000+
Got something to say? Need help?