Home » Useful Tools

Easy Code Syntax Highlighting WordPress Plugin

Published on March 19, 2008 No CommentPrint This Post Print This Post

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

This article was written by John Kolbert on March 19, 2008 and filed as Useful Tools. Get the latest articles by subscribing to the RSS feed. This article, including images and attachments, is property of John Kolbert and is not to be republished or translated without prior written permission.

Post Toolbox

Share It


Print It

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Please read the comment policy before commenting.

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> <pre lang="" line="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.