Wrap it in <code></code> tags?
Aleister’s suggesting works to a point. including some <pre> loving will help too.
Personally, I use Code Autoescape plugin ( http://priyadi.net/archives/2005/09/27/wordpress-plugin-code-autoescape/ ) and have been pretty happy with it. Just have to remember to turn off the wysiwyg editor when doing ANY sort of code formatting.
Is there a way to turn off the WYSIWYG editor in WordPress 2.0?
Admin -> -> Users -> -> scroll to bottom left and uncheck box for visual rich text editor.
Please browse this section, and you will find plethora of plugins to do the job, I have come across many recently. Unfortunatley I am not remembered those links. But I am sure, if you browse around past 2-3 days post. You will get so many.
Or
You can visit the following and search around.
1. http://www.skippy.net/blog/plugins/
2. http://codex.ww.wp.xz.cn/Plugins
3. http://dev.wp-plugins.org/wiki/PluginDirectory
Someone suggested an easier solution that has worked well.
For the <, just use HTML code <
For the >, use >
When using this HTML in the HTML editor, I had problems, but if you go to your user profile, you can deselect using the visual rich text editor. When substituting the brackets for the HTML code in the old wordpress editor, it works.