Ok, not technically a programming question but I want a plugin for my WordPress blog that displays code snippets.
Can anyone here recommend a good one? Also, do you guys know which one Jeff uses on codinghorror. That one looks really good.
Thanks.
Ok, not technically a programming question but I want a plugin for my WordPress blog that displays code snippets.
Can anyone here recommend a good one? Also, do you guys know which one Jeff uses on codinghorror. That one looks really good.
Thanks.
You must be logged in to post a comment.
wordpress.com claims to use Alex Gorbatchev’s syntaxhighlighter Google Code project.
I guess you might be interested in run-this – there is a wordpress plugin to allow your readers to run your snippets in the browser.
For WP-Snippets, I use Prettify.
You should probably use a plugin for escaping characters to be able to display code without having to do it yourself, or your code wont be displayed. Or just put this in functions.php in your theme folder to do this automatically:
And then wrap your code with
[code]<?php echo 'hello world!'; ?>[/code]
Source: Code in posts