As a rule, adversity reveals genius and prosperity hides it.
Horace

When I first started to blog on this site, I did not have a good way to show source code.  I want color coded source with proper indentation.  WordPress made this hard to do.  I created a few blog entries with images of source code.  Copy and paste do not work from an image.

After a short search, I found a WordPress plug-in called SyntaxHighlighter.  This short blog will show the relevant information for using this plug-in.  The plug-in can be found here.

  1. Download zip file and extract contents.
  2. Using FTP, copy contents of zip file to your WordPress site sub-folder, /wp-content/plugins
  3. From your WordPress admin page, select plug-ins menu.  Then, select SyntaxHighlighter and Activate.

Very easy to use.  To display this C# code,

protected void Page_Load(object sender, EventArgs e)
{
  // Do Something
}

just enter this code into your blog.


There are many source code languages available. Go here for more information.

Tags: ,

Leave a Reply


*