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.

Discuss This Article


5 Responses to “Syntax Highlighting in WordPress”

  1. AvatarAmit

    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! :)

    Reply to this comment.
    1
  2. AvatarRoman

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

    Reply to this comment.
    2
  3. AvatarJimmy

    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 !

    Reply to this comment.
    3
  4. pingback pingback:
    Archetype Coder » Blog Archive » Escrevendo código no seu post com plugin

    [...] 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: [...]

    Reply to this comment.
    4
  5. AvatarMoiKano

    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

    Reply to this comment.
    5

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Comment Preview:

 (2614) - wordpress syntax highlighting (59) - wordpress code highlight (17) - wordpress syntax highlight (14) - wordpress highlight code (10) - wordpress code highlighting (6) - wordpress syntax highlighter (6) - wordpress code syntax highlighting (5) - syntax (5) - syntax highlighter wordpress (5) - ig syntax hilite (4) - wordpress code highlighting fast (4) - syntax highlighting wordpress (4) - wordpress syntax highlite (3) - Wordpress highlight text (3) - wordpress syntax highlight powershell (3) - wp-syntax highlight (3) - wordpress syntaxhighlighter (3) - syntax hilite js (2) - wordpress syntax highliting (2) - wordpress syntax hilite (2) - syntax coloring wordpress (2) - Syntax Highlighter wordpress plugin (2) - syntax highlight css (2) - wordpress code highlighter (2) - wordpress php highlighting (2) - best wordpress syntax highlighting (2) - code highlighted wordpress (1) - code highlighting plugin wordpress (1) - wordpress syntax hilite ig (1) - code highlite wordpress (1) - wordpress syntax highlight-plus (1) - coloerful syntax hightlight wordpress (1) - Wordpress code css highlight (1) - C# wordpress syntax highlighting (1) - java syntax highlighting engine (1) - syntax highlight R wordpress (1) - wordpress comment syntax highlighting (1) - best wordpress plugin syntax highlighting (1) - code syntax highlight plugin for wordpress (1) - highlight CSS wordpress (1) - syntaxhighlight wordpress plugin (1) - syntaxhighlighter wordpress (1) - keyword highlighting wordpress (1) - WordPress Code Hilight (1) - syntaxt hilite wordpress (1) - wordpress syntax highlighting? (1) - wordpress syntax highlight nocontrol (1) - wordpress frontend syntax highlighter (1) - widget syntax highlight for wordpress (1) - wordpress syntax highlighter frontend (1) - wordpress comment syntax (1) - hilighting code wordpress (1) - wordpress syntax highlite plugin (1) - wordpress sysntax highlighting (1) - wordpress [sourcecode] highlight (1) - wordpress syntax-highlighting (1) - wordpress blog syntax highlighting (1) - wordpress ios syntax highlighter (1) - wordpress F# syntax highlighting (1) - wordpress syntax highlighting twilight (1) - wordpress syntax higlight (1) - syntax highlighting wordpress drupal (1) - syntax highlighter in wordpress.com (1) - wordpress syntax highlighing (1) - HIGHLIGHTED code wordpress (1) - wordpress gesh syntax highlight (1) - wordpress syntaxhighlight (1) - wordpress code highliter (1) - syntax highlighting for wordpress (1) - syntax hilite wordpress (1) - code syntax highlighting wordpress (1) - syntax coloring wordpress scroll (1) - syntax highlighter wordpress perl (1) - wordpress highlight java code syntax (1) - ig syntax highlighter (1) - highlight code in wordpress (1) - syntax highlighter for wordpress (1) - wordpress syntax (1) - wordpress syntax highlight plugin (1) - syntax highlight wordpress (1) - code highlight wordpress (1) - wordpress php syntax highlighting (1) - syntax highlighting wordpress plugin (1) - codes for highlighting (1) - syntax highlighting plugin for wordpress (1) - ig syntax hilight (1) - ruby css highlighting wordpress (1) - Java Syntax Highlighter source code (1) - ig: syntax highlighter (1) - syntax hilite (1) - wordpress highlight tags (1) - wordpress syntax highlight ruby code (1) - java code wordpress (1) - wordpress sourcecode highlighting (1) - highlight sourcecode wordpress (1) - plugin wordpress highlight code (1) - wordpress Syntax highlight comments not working (1) - wordpress xml syntax highlight (1) - iG:Syntax quicktags.js (1) - code syntax highlighting blogs (1) - wordpress javascript syntax highlight (1) - source code syntax highlighting css (1) - highlighting source code wordpress (1) - wrodpress syntax highlight (1) - wordpress syntax highlighting ruby (1) -