Syntax Highlight Code in Wordpress Posts

From time to time I post code snippets in blog posts. Today I found a wordpress plugin, Code Snippet 2.0, a plugin that eases code posting by escaping the the code right. And moreover Code Snippet 2.0 displays the code with highlighting. The plugin uses GeSHi syntax highlighter engine – a flexible and easy extendable highlighter engine.

Install

  • Download the plugin here
  • Copy archive to wp-content/plugins directory
  • Extract the zip file
  • When extracted properly you should have a directory structure like: /wp-content/plugins/codesnippet
  • Enable the Plugin in WP-admin

Usage

<code lang="php">
< ?php
echo "Hello World";
?>
</code>

Result:

< ?php
echo "Hello World";
?>

The list of supported languages in Code Snippet 2.0:

  • actionscript-french
  • actionscript
  • ada
  • apache
  • applescript
  • asm
  • asp
  • bash
  • caddcl
  • cadlisp
  • c_mac
  • c
  • cpp
  • csharp
  • css-gen
  • css
  • delphi
  • diff
  • div
  • dos
  • d
  • eiffel
  • freebasic
  • gml
  • html4strict
  • ini
  • inno
  • java
  • javascript
  • lisp
  • lua
  • matlab
  • mpasm
  • nsis
  • objc
  • oobas
  • oracle8
  • pascal
  • perl
  • php-brief
  • php
  • python
  • qbasic
  • sdlbasic
  • smarty
  • sql
  • vbnet
  • vb
  • vhdl
  • visualfoxpro
  • xml

Related posts:

  1. Repacked Code Snippet 2.0 With GeSHi Syntax Highlighter Version 1.0.7.18
  2. Blog Comment Spam and Wordpress Anti-Spam Plugins
  3. Wordpress plugins
  4. Add del.icio.us Bookmarks to Wordpress
  5. PHP Source Code Security Audit Tool
  6. Howto Tunnel Through a Firewall Using Sockscap and SSH
  7. Adobe Open Sources The Flash Scripting Engine
  8. Free: Simple Online Nokia Unlock Code Generators
  9. Debugging Server-side Code through IntelliJ IDEA or Eclipse with BEA Weblogic 8.1
  10. PHP Professional Tip #1 – Type Hinting

Popular Related Items »

9 Comments »

  1. Dan Olsen said,

    March 25, 2007 @ 12:59

    Hello,

    Thank you for a great plugin for wordpress

  2. Scrap » Blog Archive » wordpress code highlight plugin said,

    November 20, 2007 @ 3:02

    [...] wordpress code highlight plugin [...]

  3. anne said,

    May 9, 2008 @ 5:33

    testing, any demos?

  4. Раскрашиваем блоки с кодом. PHP библиотеки и плагины для WordPress said,

    August 7, 2008 @ 9:39

    [...] 7) Code Snippet 2.0 [...]

  5. alee said,

    February 12, 2009 @ 13:19

    thanks. how can i integrate it into my wordpress blog? my blog is registered and hosted by wordpress. is there anyway to edit that ?

  6. Stephan said,

    February 13, 2009 @ 22:04

    Please check out the Wordpress Syntax Highligher Plugin at http://www.osexpert.net/wordpress-syntax-highlighter/ ! Easy to use!

    Easy Plug and Code :O)

  7. Pami?tniczek » Blog Archive » Fragmenty kodu na Wordpressie - Just another WordPress weblog said,

    April 1, 2009 @ 18:00

    [...] okaza? si? plugin Code Snippet. Oparty jest o projekt GeSHi. Obs?uguje on kilkadziesi?t j?zyków [...]

  8. Mat said,

    June 29, 2009 @ 16:42

    http://www.neathighlighter.com is a very neat and easy to use code highlighter

  9. Techs24x7.com said,

    June 3, 2010 @ 13:00

    When i m trying to post any sql lang commnd. in my blog err shows..
    Can any one help me out ???

RSS feed for comments on this post · TrackBack URI

Leave a Comment