WordPress Syntax Highlighter

| Posted by watashii | Filed under WordPress

While trying to find a way to syntax highlighting / autoformat programming code on WordPress, I came across this.  After a while, I realised it only works for WordPress hosted page.  To enable syntax highlighting on a self hosted WordPress blog,  you need to install the Google Syntax Highlighter plugin.

Here are the installation steps:

1) Download the plugin zip file.
2) Extract plugin into /wp-content/plugins directory.
3) Activate the plugin.
4) When posting, use the HTML editor and insert the following code:
<pre name="code" class="sql">
select * from tab;
</pre>

5) Hopefully looks like:

select * from tab;

The google documentation for using the syntax highligher is available here.

Share:

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Print
  • email

Related Posts:

  1. Upgrading to WordPress 2.7 Coltrane
  2. WordPress Code At The End Of URLs, Hack?

Tags: , , , , ,

Leave a Reply