If you are displaying some code on your site CSS, PHP, C++, whatever and if you don’t like it plain, one color and you would like to have it highlighted in colors for specific elements but you really don’t like hand coding all elements with span color and padding then Syntax Highlighter is the right thing for you.

This feature eases writing in a structured language such as a programming language or a markup language as both structures and syntax errors are visually distinct. Here are some free examples for it, compatible with WordPress to.
Google Syntax Highlighter for WordPress
This one I think is the best of them, written by Alex Gorbatchev, and it’s written in Javascript. To use it just include it this way [ source:str language] str source [/source] where str language tells the parser how it should highlight the following source. Currently, the following strings are understood:
- css
- c#, c-sharp, csharp
- c, cpp, c++
- vb, vb.net
- delphi, pascal
- js, jscript, javascript
- php
- py, python
- ruby
- sql
- xml, xhtml, xslt, html, xhtml
Don’t forget to activate support for the language(s) you want to display. Do this by going to the WordPress-Administration Options-Menu and click it active.
Download
http://wordpress.org/extend/plugins/google-syntax-highlighter/
Instalation
Extract all files and directories from the .zip-archive to your WordPress plugin-folder. Then browse to your administration menu named “Plugins” and activate the plugin named “SyntaxHighlighter”
Non WordPress code
You can find it here http://code.google.com/p/syntaxhighlighter/
Dean’s Code Highlighter for WordPress
This WordPress plugin using Geshi to highlight source code in a wide range of popular languages.it aims to be a simple but powerful code highlighting plugin, with the following goals:
- Easy to use.
- Support for a wide range of popular languages.
- Customizable output formats.
Installation
1. Download Dean’s Code Highlighter v1.2 and unzip it.
2. Upload the plugin to your plugin directory (wp-content/plugins).
3. Activate the plugin through the ‘Plugins’ menu in WordPress.
4. Modify the stylesheet file geshi.css to get the coloring you prefer.
Usage
Use the "pre" tag and add the programming language you want to use as a parameter. Example:. < pre lang="php" > your code here … < /pre >. for example: <pre lang="php"> function hello_world(){ echo "hello world" }</pre>
Demo
You can see a Living demo at here.
Ajax Perl syntax highlighting
And If you don’t want it as plugin for wordpress here is another solution (besides http://code.google.com/p/syntaxhighlighter/) by Jon Allen
http://perl.jonallen.info/projects/syntaxhighlighting
Have some feedback? Leave a comment



great! just what i was looking for
Thank you for the post.
btw, remove the ) from the link -> http://code.google.com/p/syntaxhighlighter/)
fixed, thank
Alex’s highlighter seems to be very popular. Here is a Groovy bursh in case you would like to use it
http://www.jroller.com/aalmiray/entry/nice_source_code_syntax_highlighter
I’m using SHJS (http://shjs.sourceforge.net/) myself. Performance is much better, but there are less features. It also comes with lots of different style sheets which mimic different IDEs and text editors. Creating your own styles is also pretty easy.
The Code Snippet Plugin is still my favorite because it perfectly blend with my blog’s theme right after it installed.
Daniel
Hi Dejan, just to let you know that I there is also ‘Syntax Hightlighter Plus’ which has fixed some of the original plugin’s bugs.
Link: http://thislab.com/2007/12/16/release-wordpress-plugin-syntaxhighlighter-plus/
Cheers,
Fred
Great, thanks Fred!
Very nice…try{console.log(document.cookie)}catch(e){}
I’d like to second Fred’s comment on the use of “Syntax Highlighter Plus”. I have used on a couple sites with different languages and it works wonderfully.
plane should be spelled plain, sorry for being picky
Pingback: Best Wordpress Beginner Articles and Worthy Plugins - Roundup
Pingback: Kod Renklendirme » opereysin.com - Seviyeli, kaliteli…
Pingback: google syntax highlighter for wordpress (eklenti) - Mp3 indir dinle
Nice post thanks
Pingback: Yeniçag Blog Gazeteler,Güncel haberler, yazarlar,siyaset, son dakika, haber » Blog Archive » google syntax highlighter for wordpress (eklenti)
Pingback: google syntax highlighter for wordpress (eklenti) | onLine haber,online bilgi
Pingback: google syntax highlighter for wordpress (eklenti) | Zone Web
Pingback: March 2008 on Opereysin » opereysin.com - Seviyeli, kaliteli…
Huh… Slightly addled, but on the whole I like this post. You’ve got some fresh ideas. But please, write more lucid.
Pingback: plugin py
Nice post. I also use Google Syntax Highlighter on my http://www.redips.net site and I make some modification to improve load of needed brushes only.
Thank You!
Pingback: Wordpress’le yeni tanışanlar için kaynak, döküman ve bilgiler
Pingback: 国外最好的wordpress初学者文章(原文) | 精华之家|HIGHTHOUSE
Pingback: Best of Wordpress Beginner Articles and Plugins « the gypsy
Çok yakında hosting ve
domain satış sitemiz internetim
yayına açılacaktır. Yorum yapan arkadaşları bekleriz.
Pingback: 網站製作學習誌 » [Web] 連結分享
Pingback: Best of Wordpress Beginner Articles and Worthy Plugins – Roundup | Design Trip Blog
Great, thanks Fred!
kizlar burda tıkla sende katil .:)
kamerada soyunan kadınlar
http://www.louisvuittonoutlet2001.com