Posting syntax highlighted source code to Wordpress

17 Jul 2010, <1 minute read

So I almost left Wordpress the other day, when I found the code tags didn’t syntax hightlight. Since then I’ve found this page: which describes how to do it with sourcecode tags.

I’m not sure why it was so hard to find, but Wordpress has a big thing about blocking Javascript, so searching for “syntax highlighting javascript on wordpress” provided suitably incorrect results. The highlighting options look pretty comprehensive, and although the highlighting of dojo code isn’t quite spot on (I haven’t found an editor that is, TextMate is about as close as I’ve got), it is certainly more readable than the ‘pre’ tags.


Was this post useful? Why not help others find it by sharing on twitter. While you're there, get in touch and let me know what you think!

The beginning, and the end of blogging! Mythtv Remote X10

Hi, I'm Ryan

I care about code, building great teams and the community. I run Slate Horse but I'm still a full-stack developer. Previously co-organiser of JSOxford and OxRUG.

Get in touch