Easy Code Syntax Highlighting WordPress Plugin

This entry was posted on Mar 19 2008

I installed a new WordPress plugin today that I’m very happy with. It’s called WP-Syntax. As the name suggests, it lets you easly apply common syntax highlighting to many different code languages on your WordPress blog. Common languages that it support include html4strict, PHP, javascript, java, CSS, XML, perl, and many others.

Usage is very easy. Simply enclose your code in the following: <pre lang="LANGUAGE" line="X">Your Code Here</pre>. Replace LANGUAGE with the name of the language your code is in (CSS, PHP, etc) and replace the line="X" with the line number that you want the code box to begin with. Installation was a breeze, and after adding the suggested CSS values to my theme’s stylesheet it worked like a charm.

You can see a real example from my blog on my earlier post. WP-Syntax gets put on my list of favorite plugins.

Useful Articles

Post a Comment

Please read the comment policy before commenting.