I have an ancient version of WordPress and its WYSIWYG editor really mucks up code examples in my blogs (removing lines and whitespace when saved, etc).
I wish to upgrade and install a theme/plugin that will make it easy to display code
in a pleasant way.
Any suggestions?
Many sites use Google Code Prettify for syntax highlighting on code, and people have developed wordpress extensions that make it easy to add GCP to a blog. Here’s an example of one:
http://www.deanlee.cn/wordpress/google-code-prettify-for-wordpress/
I recommend Syntax Highlighter Evolved.
http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/
You can use shortcodes like [php] or [css] to contain your source code, and it will be rendered nicely when you view the post/page.
I recommend WP-Syntax.
From the usage notes: