Displaying code examples in WordPress

Posted by bcherney on January 19, 2009 under Nerd Herd | Be the First to Comment

If you are going to give examples of code on your blog then manually converting your code to HTML special characters will get a little annoying.

Here is a plug in that will allow you to easily tag what is to be executed as code and what should be displayed without execution.

Here is a quick example of how to bold in html.
Without the CODE tag
<strong>With the CODE tag</strong>

Quick and easy. Here is the info.
1) download and install plugin WP_CodeShield

2) just put the tags <code></code> around your code examples.

All set. As always let me know if you have a different product that may work better or comments about this one.

Version of this example .4 2008-2-4
Version of WordPress 2.7 (The FYI says compatible up to 2.3.1 but looks to work on 2.7)

Add A Comment