Displaying code in a wordpress.com blog

How my code gets rendered on these pages is important to me. With most of the over 1,000 posts here being code-rich, that has made the transition to wordpress.com particularly painful.

Those who have kept WordPress blogs on a paid hosting account generally have the freedom to install whatever themes and plugins they want, and to modify the shipping style sheets to get just the right look. I lost all that when I switched this blog over to wordpress.com, and now in addition to fixing image and page links I have to deal with a metric ton of code snippets whose default formatting leaves much to be desired.

The task is not impossible, of course. In fact wordpress.com does have a simple default code formatting directive that renders code quite nicely:

[code language=”perl”]
your code here
[/code]

There are a variety of options available for this method that can be found in the support article Posting Source Code.

All I need to do now is figure out how to bulk change all my

<pre lang=”perl”>
</pre>

tags to the new format and I’ll be in business.

Stay tuned for the eventual solution!

This entry was posted in Development, Systems Analysis on by .

About phil

My name is Phil Lembo. In my day job I’m an enterprise IT architect for a leading distribution and services company. The rest of my time I try to maintain a semi-normal family life in the suburbs of Raleigh, NC. E-mail me at philipATlembobrothersDOTcom. The opinions expressed here are entirely my own and not those of my employers, past, present or future (except where I quote others, who will need to accept responsibility for their own rants).