How to add a code snippet to a page with syntax highlighting

You can add a code snippet to a page using the [ code] short-code.

You can either enclose the code snippet between [ code] and [ /code]

OR

Add the code in a custom field and then add the custom field name to the short-code as follows [ code custom='blah'][ /code]