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]

  • Share/Bookmark

Related posts:

  1. How to set the language of a code snippet added to a page for proper formatting
  2. How to activate Syntax Highlighting for code snippets in posts and pages
  3. How to enable Syntax Highlighting in Theme and Plugin Editors
  4. How to prevent wordpress from messing up my code snippets