Skip to content


Syntax Highlighting in WordPress

Some of my most recent posts involving code have displayed the wonderful blocks of login in all its syntax highlighted glory. A week ago I stumbled on the sweet syntax highlighting plugin - iG:Syntax Highligher (here's the link to the actual plugin).

The highlighter uses GeSHi for the highlighting engine then wraps a bunch of sweet javascript functions around it to give it a bunch of features (i.e. viewing as syntax highlighted code or plain text toggle). Here's the supported language list:

CODE:
  1. [as] & [/as]
  2. [asp] & [/asp]
  3. [c] & [/c]
  4. [cpp] & [/cpp]
  5. [csharp] & [/csharp]
  6. [css] & [/css]
  7. [delphi] & [/delphi]
  8. [html] & [/html]
  9. [java] & [/java]
  10. [js] & [/js]
  11. [mysql] & [/mysql]
  12. [perl] & [/perl]
  13. [php] & [/php]
  14. [python] & [/python]
  15. [ruby] & [/ruby]
  16. [smarty] & [/smarty]
  17. [sql] & [/sql]
  18. [vb] & [/vb]
  19. [vbnet] & [/vbnet]
  20. [xml] & [/xml]

Installation is super easy and simply requires you to edit the quicktags.js file in wp-admin. If you're looking for a syntax highlighter for your blog, I'd suggest you give this one a try. w00t.

Posted in Blog, Random News, Technology.

Tagged with , , .


7 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Amit says

    Installation is super easy and simply requires you to edit the quicktags.js file in wp-admin

    You are not required to change the quicktags.js file. its required only if you want to have Quicktag buttons for the codes in your editor, othewise not. Its entirely an optional step! :)

  2. Roman says

    Thanks! This will definitely help me in my new RoR blog. Just installed and tried it out. Works excellent. Cheers!

  3. Jimmy says

    But sorry to say it definitely not work properly with wordpress 2.x versions. Can you tell me the solution what to do with wordpress 2.x to work it properly !

  4. MoiKano says

    thank’s a lot … wonderfull plug-in!!!

    only one note: in my first WP (2.1) installation it didn’t go well (You need to be a Level 8(or above) … etc);

    I inserted manually in the table “wp_users” a row called “user_level” (integer [2], unsigned, defalt 0) and after I assigned “10″ to user “admin” … now it is perfect!!!

    MoiKano

  5. Abdessamad says

    thanx ig for the plugin
    thanx MoiKano for the wordpresse 2.7 workaround! since ig is not updated since 2006!

  6. Vinicius Massuchetto says

    I like WP-Syntax. It uses the “pre” tag, so if you accidentally disable this plugin, or even if there’s any issue with newer WordPress version, it won’t totally screw up with your post, it will just take the colors and line numbers off.

Continuing the Discussion

  1. Archetype Coder » Blog Archive » Escrevendo código no seu post com plugin linked to this post on February 9, 2007

    [...] O plugin que eu escolhi foi o iG no blog de BorkWeb vc encontra uma boa resenha. Abaixo vão algumas opções e exemplos. Opções: PLAIN TEXT CODE: [...]



Some HTML is OK

or, reply to this post via trackback.