WP-GeSHi-Highlight — rock-solid syntax highlighting for 259 languages

from 0$

WP-GeSHi-Highlight — rock-solid syntax highlighting for 259 languages is a WP Plugin Package from the Open Source WP Plugins range 259 languages. Mobile-friendly. Rock-solid engine (GeSHi). Simple.


For more information about a tailored WP Plugin Package like WP-GeSHi-Highlight — rock-solid syntax highlighting for 259 languages please contact us directly.

Live demo

• Highlights:

  • Supports 259 languages.
  • Mobile-friendly: does not run JavaScript. Saves bandwidth and battery compared to JavaScript-based solutions.
  • Near-zero load on the backend. With a caching solution this does not affect your page load time at all.
  • Line numbering. If you want to (no vertical displacements between code line and line number).
  • Default style was tested with more than 20 themes, including Twenty Ten to Fifteen, and tweaked based on a bunch of user feedback.
  • If you’d like to tweak the style: just provide your own CSS file. Styles are highly & easily configurable.
  • Per-block styles: each code block on a single page can be styled on its own (if that is something you would liked to do).
  • Clean, small and valid HTML output.
  • Well-documented source code using modern WordPress API calls.
  • I have maintained this plugin for several years and I plan to continue to provide support.
  • Based on GeSHi, a reliable and well-established PHP highlighting engine, used by popular community forum applications such as phpBB or wiki applications such as Dokuwiki or MediaWiki.

WP-GeSHi-Highlight works as a drop-in replacement for WP-Syntax, which does not seem to be maintained anymore (as of 2015). Make the switch, it should just work (let me know how it went)!

• Usage:

WordPress 5 users: for now I have tested this plugin only with the Classical Editor. Gutenberg is not yet supported (it may work though, let me know).

Recommendation: use the “Text” (raw) editor. Do not use the “Visual” editor. Switching between both may corrupt the contents of your code blocks.

In the text editor insert code blocks as pre blocks, and use the lang argument to define the language of the code snippet:

<pre lang="language">
    CODE
</pre>

A short example for the bash language:

<pre lang="bash">
    $ dd if=/dev/zero of=image.ext3 bs=1M count=10000 oflag=append conv=notrunc
</pre>

Publish/preview, and have a look at the result!

Also check out the reference documentation for all available options. You can find it on the plugin’s website. Note that more usage examples can be found on the demo website.

• Issues:

A bunch of websites have used this plugin for years, and it seems to serve its purpose well. 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!

Download & install the zip archive

The plugin package installer can be downloaded from the WP2E project tab called “code”.

1 – Select the version to download if this option is available otherwise the “latest” version of the main plugin will be used.

2 – After downloading the zip archive install the plugin package installer in you local environment and activate the script from the plugin list.

3 – Under the section “Plugins” of the admin dashboard you should see a new “Dependencies & Licenses” link. Follow the instructions from this panel to finalize the installation of the missing dependencies.

Tips: Use the WP2E panel to add/suggest new dependencies to the local installation. Press F5 in the list of dependencies if the changes are not displayed right away.

WP-GeSHi-Highlight — rock-solid syntax highlighting for 259 languages

typePlugin
version1.4.2
description259 languages. Mobile-friendly. Rock-solid engine (GeSHi). Simple.