Skip to content


Highlight Source Pro – A must have Plugin for Code Whores

If you’re like me and occasionally need to post code snippets in your wordpress powered blog posts, then you absolutely adore the highlight source pro plugin by Christian Knoflach.  Gone are the days of hard to read and uncopyable code snippets.  Highlight Source pro not only displays your code as a preformatted text via the <pre> tag, but it also uses the Geshi color coding system to give your readers properly highlighted code, with no additional effort from you!  Just start a block using a <pre> tag in html view and give it the proper language attribute.  As an example, for a block of php code, you would enter the following:

<pre lang="php">
     echo("This is a sample of a block of php code.");
     echo("any code will work here, from php to BASIC to bash.");
     echo("it will even make sure that the block scrolls without breaking your page template on really long lines like this one.");
     echo("though you may have to type all of the code with the WYSIWYG editor disabled.");
?>

It's as simple as that (and yes, I'm using the plugin to show you how the plugin works!

The only drawback is that if you're using the visual editor, you may have to go back and add your code at the end, then save the post from the code editor. This is only a minor annoyance, however, and I think that the pluses definitely outweigh the negatives.

If you've got code to share with your eaders, I think this little gem is more than worth the time and effort to use.

Popularity: 1% [?]

Posted in WordPress.

Tagged with , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.

CommentLuv Enabled