How do I add syntax highlighting to a WordPress blog hosted on WordPress.com?

codingfloor picture codingfloor · Aug 13, 2009 · Viewed 12.1k times · Source

I'd like to have a good syntax highlighter for my WordPress blog. What options do I have available? I often see one which has well-colored syntax highlighting and options to copy to the clipboard. Does anyone have an idea what tool this is?

Answer

samoz picture samoz · Aug 13, 2009

On wordpress.com, you can't install plugins, so you have to use Wordpress' built-in widget.

Do it like:

[code language='python']

[/code]

Note that those tags go inside your visual editor, not the HTML editor.

You can find more information here.